SWEEP: Reworked FEATURE_CLONEABLE so it is a compile option that is not enabled by default. Microsoft's recommendation is not to use ICloneable, but we provide the option in a custom compile. Note that there is no support for this interface in .NET Standard 1.0.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/94d0291f Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/94d0291f Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/94d0291f Branch: refs/heads/master Commit: 94d0291f54bd99a7a7576b93624ffdcc52fb4e3f Parents: 98c4bf5 Author: Shad Storhaug <[email protected]> Authored: Sat Sep 9 01:19:47 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Sat Sep 9 01:19:47 2017 +0700 ---------------------------------------------------------------------- .../Analysis/Compound/Hyphenation/CharVector.cs | 5 +++- .../Compound/Hyphenation/TernaryTree.cs | 10 ++++++-- .../Lucene.Net.Analysis.Common.csproj | 1 + .../Lucene.Net.Analysis.Kuromoji.csproj | 1 + .../TokenAttributes/BaseFormAttributeImpl.cs | 5 +++- .../TokenAttributes/InflectionAttributeImpl.cs | 5 +++- .../PartOfSpeechAttributeImpl.cs | 5 +++- .../TokenAttributes/ReadingAttributeImpl.cs | 5 +++- .../ByTask/Stats/TaskStats.cs | 6 +++-- .../ByTask/Tasks/PerfTask.cs | 5 +++- .../ByTask/Tasks/TaskSequence.cs | 1 - .../Lucene.Net.Benchmark.csproj | 1 + src/Lucene.Net.Facet/Lucene.Net.Facet.csproj | 1 + .../Taxonomy/WriterCache/CharBlockArray.cs | 5 +++- .../Flexible/Core/Nodes/PathQueryNode.cs | 5 +++- .../Flexible/Core/Nodes/QueryNodeImpl.cs | 5 +++- .../Lucene.Net.QueryParser.csproj | 1 + .../Surround/Query/SrndQuery.cs | 5 +++- .../TokenAttributes/CharTermAttribute.cs | 5 +++- .../Analysis/TokenAttributes/FlagsAttribute.cs | 5 +++- .../Analysis/TokenAttributes/OffsetAttribute.cs | 5 +++- .../TokenAttributes/PayloadAttribute.cs | 5 +++- .../PositionIncrementAttribute.cs | 5 +++- .../TokenAttributes/PositionLengthAttribute.cs | 5 +++- .../Analysis/TokenAttributes/TypeAttribute.cs | 5 +++- .../CompressingStoredFieldsIndexReader.cs | 5 +++- .../Codecs/Compressing/Decompressor.cs | 5 +++- .../Lucene3x/Lucene3xStoredFieldsReader.cs | 5 +++- .../Codecs/Lucene3x/SegmentTermEnum.cs | 5 +++- src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs | 5 +++- src/Lucene.Net/Codecs/Lucene40/BitVector.cs | 5 +++- .../Lucene40/Lucene40StoredFieldsReader.cs | 5 +++- src/Lucene.Net/Codecs/StoredFieldsReader.cs | 5 +++- src/Lucene.Net/Codecs/TermVectorsReader.cs | 5 +++- .../Index/DocumentsWriterPerThreadPool.cs | 5 +++- src/Lucene.Net/Index/FlushPolicy.cs | 5 +++- src/Lucene.Net/Index/IMergeScheduler.cs | 9 ++++++- src/Lucene.Net/Index/IndexDeletionPolicy.cs | 5 +++- src/Lucene.Net/Index/IndexWriterConfig.cs | 5 +++- src/Lucene.Net/Index/MergePolicy.cs | 5 +++- src/Lucene.Net/Index/MergeScheduler.cs | 5 +++- src/Lucene.Net/Index/SegmentInfos.cs | 5 +++- src/Lucene.Net/Index/TermState.cs | 5 +++- src/Lucene.Net/Lucene.Net.csproj | 5 ++-- src/Lucene.Net/Search/Query.cs | 5 +++- src/Lucene.Net/Search/Spans/SpanNearQuery.cs | 5 +++- src/Lucene.Net/Search/Spans/SpanNotQuery.cs | 5 +++- src/Lucene.Net/Search/Spans/SpanOrQuery.cs | 5 +++- .../Search/Spans/SpanPositionCheckQuery.cs | 5 +++- src/Lucene.Net/Store/DataInput.cs | 5 +++- src/Lucene.Net/Store/IndexInput.cs | 5 +++- src/Lucene.Net/Store/RAMInputStream.cs | 5 +++- .../Support/Compatibility/ICloneable.cs | 26 -------------------- src/Lucene.Net/Support/EquatableList.cs | 5 +++- src/Lucene.Net/Support/EquatableSet.cs | 5 +++- src/Lucene.Net/Util/AttributeImpl.cs | 5 +++- src/Lucene.Net/Util/AttributeSource.cs | 5 +++- src/Lucene.Net/Util/Automaton/Automaton.cs | 5 +++- src/Lucene.Net/Util/Automaton/Transition.cs | 5 +++- src/Lucene.Net/Util/BytesRef.cs | 5 +++- src/Lucene.Net/Util/CharsRef.cs | 5 +++- src/Lucene.Net/Util/InfoStream.cs | 5 +++- src/Lucene.Net/Util/IntsRef.cs | 5 +++- src/Lucene.Net/Util/LongsRef.cs | 5 +++- src/Lucene.Net/Util/OpenBitSet.cs | 5 +++- src/Lucene.Net/Util/SetOnce.cs | 5 +++- src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj | 1 + .../Lucene.Net.ICU/Support/BreakIterator.cs | 5 +++- 68 files changed, 253 insertions(+), 90 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs index c7982a8..6245f50 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs @@ -27,7 +27,10 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation /// /// This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified. /// </summary> - public class CharVector : ICloneable + public class CharVector +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary> /// Capacity increment size http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs index 07b3772..b0cbc23 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs @@ -65,7 +65,10 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation /// This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified. /// </summary> - public class TernaryTree : ICloneable + public class TernaryTree +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { // We use 4 arrays to represent a node.I guess I should have created a proper // node class, but somehow Knuth's pascal code made me forget we now have a @@ -550,7 +553,10 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation /// </summary> private string curkey; - private class Item : ICloneable + private class Item +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { internal char parent; internal char child; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj index 16a344d..dabca88 100644 --- a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj +++ b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj @@ -54,6 +54,7 @@ <ProjectReference Include="..\Lucene.Net\Lucene.Net.csproj" /> </ItemGroup> + <!-- NOTE: Microsoft's recommendation is not to use the ICloneable interface. We put in a FEATURE_CLONEABLE constant in case anyone wants to add it to the build --> <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <DefineConstants>$(DefineConstants);FEATURE_DTD_PROCESSING</DefineConstants> <DebugType>portable</DebugType> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj b/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj index a95a045..9da3364 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj +++ b/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj @@ -54,6 +54,7 @@ <ProjectReference Include="..\Lucene.Net.Analysis.Common\Lucene.Net.Analysis.Common.csproj" /> </ItemGroup> + <!-- NOTE: Microsoft's recommendation is not to use the ICloneable interface. We put in a FEATURE_CLONEABLE constant in case anyone wants to add it to the build --> <!--<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' "> <PackageReference Include="System.Text.Encoding.CodePages" Version="4.3.0" /> </ItemGroup> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs index fe55aff..e9c82c8 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs @@ -22,7 +22,10 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes /// <summary> /// Attribute for <see cref="Token.GetBaseForm()"/>. /// </summary> - public class BaseFormAttribute : Attribute, IBaseFormAttribute, System.ICloneable + public class BaseFormAttribute : Attribute, IBaseFormAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private Token token; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs index 0554583..fe0dae8 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs @@ -23,7 +23,10 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes /// <summary> /// Attribute for Kuromoji inflection data. /// </summary> - public class InflectionAttribute : Attribute, IInflectionAttribute, System.ICloneable + public class InflectionAttribute : Attribute, IInflectionAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private Token token; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs index fa3376d..c043511 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs @@ -23,7 +23,10 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes /// <summary> /// Attribute for <see cref="Token.GetPartOfSpeech()"/>. /// </summary> - public class PartOfSpeechAttribute : Attribute, IPartOfSpeechAttribute, System.ICloneable + public class PartOfSpeechAttribute : Attribute, IPartOfSpeechAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private Token token; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs index c78e867..6697598 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs @@ -23,7 +23,10 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes /// <summary> /// Attribute for Kuromoji reading data /// </summary> - public class ReadingAttribute : Attribute, IReadingAttribute, System.ICloneable + public class ReadingAttribute : Attribute, IReadingAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private Token token; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs b/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs index 2d5ff3b..94d354b 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Stats/TaskStats.cs @@ -29,7 +29,10 @@ namespace Lucene.Net.Benchmarks.ByTask.Stats /// The same task can run more than once, but, if that task records statistics, /// each run would create its own TaskStats. /// </summary> - public class TaskStats : ICloneable + public class TaskStats +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary>Task for which data was collected.</summary> private PerfTask task; @@ -215,7 +218,6 @@ namespace Lucene.Net.Benchmarks.ByTask.Stats } } - /// <seealso cref="ICloneable.Clone()"/> public virtual object Clone() { TaskStats c = (TaskStats)base.MemberwiseClone(); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs b/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs index 2a9b65a..099e0e1 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Tasks/PerfTask.cs @@ -58,7 +58,10 @@ namespace Lucene.Net.Benchmarks.ByTask.Tasks /// </description></item> /// </list> /// </remarks> - public abstract class PerfTask : ICloneable + public abstract class PerfTask +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { internal static readonly int DEFAULT_LOG_STEP = 1000; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Benchmark/ByTask/Tasks/TaskSequence.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Benchmark/ByTask/Tasks/TaskSequence.cs b/src/Lucene.Net.Benchmark/ByTask/Tasks/TaskSequence.cs index 12d91c0..b28a530 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Tasks/TaskSequence.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Tasks/TaskSequence.cs @@ -641,7 +641,6 @@ namespace Lucene.Net.Benchmarks.ByTask.Tasks get { return tasks; } } - /// <seealso cref="ICloneable.Clone()"/> public override object Clone() { TaskSequence res = (TaskSequence)base.Clone(); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj b/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj index a0f7cda..7dcb943 100644 --- a/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj +++ b/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj @@ -65,6 +65,7 @@ <PackageReference Include="Spatial4n.Core" Version="0.4.1-beta00007" /> </ItemGroup> + <!-- NOTE: Microsoft's recommendation is not to use the ICloneable interface. We put in a FEATURE_CLONEABLE constant in case anyone wants to add it to the build --> <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <PackageReference Include="SharpZipLib.NETStandard" Version="0.86.0.1" /> </ItemGroup> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj b/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj index 962001a..6ff1c15 100644 --- a/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj +++ b/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj @@ -53,6 +53,7 @@ <ProjectReference Include="..\Lucene.Net.Queries\Lucene.Net.Queries.csproj" /> </ItemGroup> + <!-- NOTE: Microsoft's recommendation is not to use the ICloneable interface. We put in a FEATURE_CLONEABLE constant in case anyone wants to add it to the build --> <!--<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <DebugType>portable</DebugType> </PropertyGroup>--> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs index a0f35d0..151ea8a 100644 --- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs +++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs @@ -39,7 +39,10 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache private const int DEFAULT_BLOCK_SIZE = 32 * 1024; // 32 KB default size - internal sealed class Block : ICloneable + internal sealed class Block +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { //internal const long serialVersionUID = 1L; // LUCENENET: Not used http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs index 00302f3..da7019b 100644 --- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs +++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs @@ -44,7 +44,10 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes /// <summary> /// Term text with a beginning and end position /// </summary> - public class QueryText : ICloneable + public class QueryText +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { private string value = null; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs index 0b13aa9..a1d56c0 100644 --- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs +++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs @@ -30,7 +30,10 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes /// A <see cref="QueryNode"/> is the default implementation of the interface /// <see cref="IQueryNode"/> /// </summary> - public abstract class QueryNode : IQueryNode, ICloneable + public abstract class QueryNode : IQueryNode +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// index default field http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj index 641a746..b3b58b6 100644 --- a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj +++ b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj @@ -54,6 +54,7 @@ <ProjectReference Include="..\Lucene.Net.Sandbox\Lucene.Net.Sandbox.csproj" /> </ItemGroup> + <!-- NOTE: Microsoft's recommendation is not to use the ICloneable interface. We put in a FEATURE_CLONEABLE constant in case anyone wants to add it to the build --> <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <DefineConstants>$(DefineConstants);FEATURE_XSLT;FEATURE_SERIALIZABLE</DefineConstants> <DebugType>portable</DebugType> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs b/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs index cbbd027..93272e1 100644 --- a/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs +++ b/src/Lucene.Net.QueryParser/Surround/Query/SrndQuery.cs @@ -25,7 +25,10 @@ namespace Lucene.Net.QueryParsers.Surround.Query /// <summary> /// Lowest level base class for surround queries /// </summary> - public abstract class SrndQuery : ICloneable + public abstract class SrndQuery +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { //public SrndQuery() { } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs index a243d84..78babf5 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs @@ -33,7 +33,10 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="ICharTermAttribute"/>. </summary> - public class CharTermAttribute : Attribute, ICharTermAttribute, ITermToBytesRefAttribute, ICloneable + public class CharTermAttribute : Attribute, ICharTermAttribute, ITermToBytesRefAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private static int MIN_BUFFER_SIZE = 10; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs index b05a076..1c695f9 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs @@ -24,7 +24,10 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IFlagsAttribute"/>. </summary> - public class FlagsAttribute : Attribute, IFlagsAttribute, ICloneable + public class FlagsAttribute : Attribute, IFlagsAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private int flags = 0; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs index 361ac2e..a0002e0 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs @@ -22,7 +22,10 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IOffsetAttribute"/>. </summary> - public class OffsetAttribute : Attribute, IOffsetAttribute, System.ICloneable + public class OffsetAttribute : Attribute, IOffsetAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private int startOffset; private int endOffset; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs index 3806cd2..1a1000e 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs @@ -23,7 +23,10 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IPayloadAttribute"/>. </summary> - public class PayloadAttribute : Attribute, IPayloadAttribute, System.ICloneable + public class PayloadAttribute : Attribute, IPayloadAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private BytesRef payload; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs index 34222d3..9326b56 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs @@ -24,7 +24,10 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IPositionIncrementAttribute"/>. </summary> - public class PositionIncrementAttribute : Attribute, IPositionIncrementAttribute, System.ICloneable + public class PositionIncrementAttribute : Attribute, IPositionIncrementAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private int positionIncrement = 1; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs index f6cf873..a865a5e 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs @@ -24,7 +24,10 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="IPositionLengthAttribute"/>. </summary> - public class PositionLengthAttribute : Attribute, IPositionLengthAttribute, System.ICloneable + public class PositionLengthAttribute : Attribute, IPositionLengthAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private int positionLength = 1; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs b/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs index 4e2f7a7..f4f4207 100644 --- a/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs +++ b/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs @@ -24,7 +24,10 @@ namespace Lucene.Net.Analysis.TokenAttributes /// <summary> /// Default implementation of <see cref="ITypeAttribute"/>. </summary> - public partial class TypeAttribute : Attribute, ITypeAttribute, ICloneable + public partial class TypeAttribute : Attribute, ITypeAttribute +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private string type; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs b/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs index ebc9cb2..7eb192f 100644 --- a/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs +++ b/src/Lucene.Net/Codecs/Compressing/CompressingStoredFieldsIndexReader.cs @@ -32,7 +32,10 @@ namespace Lucene.Net.Codecs.Compressing /// <para/> /// @lucene.internal /// </summary> - public sealed class CompressingStoredFieldsIndexReader : ICloneable + public sealed class CompressingStoredFieldsIndexReader +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { internal static long MoveLowOrderBitToSign(long n) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/Compressing/Decompressor.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Compressing/Decompressor.cs b/src/Lucene.Net/Codecs/Compressing/Decompressor.cs index e5a4249..6637a42 100644 --- a/src/Lucene.Net/Codecs/Compressing/Decompressor.cs +++ b/src/Lucene.Net/Codecs/Compressing/Decompressor.cs @@ -25,7 +25,10 @@ namespace Lucene.Net.Codecs.Compressing /// <summary> /// A decompressor. /// </summary> - public abstract class Decompressor : ICloneable + public abstract class Decompressor +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary> /// Sole constructor, typically called from sub-classes. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs index 103a978..4d73113 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs @@ -42,7 +42,10 @@ namespace Lucene.Net.Codecs.Lucene3x /// It uses <segment>.fdt and <segment>.fdx; files. /// </summary> [Obsolete("Only for reading existing 3.x indexes")] - internal sealed class Lucene3xStoredFieldsReader : StoredFieldsReader, ICloneable, IDisposable + internal sealed class Lucene3xStoredFieldsReader : StoredFieldsReader, IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private const int FORMAT_SIZE = 4; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs b/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs index 7c53a10..69fa9bd 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/SegmentTermEnum.cs @@ -30,7 +30,10 @@ namespace Lucene.Net.Codecs.Lucene3x /// @lucene.experimental /// </summary> [Obsolete("(4.0) No longer used with flex indexing, except for reading old segments")] - internal sealed class SegmentTermEnum : ICloneable, IDisposable + internal sealed class SegmentTermEnum : IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private IndexInput input; internal FieldInfos fieldInfos; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs b/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs index 318edce..e43d61b 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/TermBuffer.cs @@ -32,7 +32,10 @@ namespace Lucene.Net.Codecs.Lucene3x /// @lucene.experimental /// </summary> [Obsolete("(4.0)")] - internal sealed class TermBuffer : ICloneable + internal sealed class TermBuffer +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { private string field; private Term term; // cached http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/Lucene40/BitVector.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs index e741f66..2ed4ffd 100644 --- a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs +++ b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs @@ -45,7 +45,10 @@ namespace Lucene.Net.Codecs.Lucene40 /// </summary> // pkg-private: if this thing is generally useful then it can go back in .util, // but the serialization must be here underneath the codec. - internal sealed class BitVector : ICloneable, IMutableBits + internal sealed class BitVector : IMutableBits +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private byte[] bits; private int size; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs index 821c1e9..c3fba03 100644 --- a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs +++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs @@ -41,7 +41,10 @@ namespace Lucene.Net.Codecs.Lucene40 /// @lucene.internal /// </summary> /// <seealso cref="Lucene40StoredFieldsFormat"/> - public sealed class Lucene40StoredFieldsReader : StoredFieldsReader, ICloneable, IDisposable + public sealed class Lucene40StoredFieldsReader : StoredFieldsReader, IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private readonly FieldInfos fieldInfos; private readonly IndexInput fieldsStream; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/StoredFieldsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/StoredFieldsReader.cs b/src/Lucene.Net/Codecs/StoredFieldsReader.cs index ab9f197..ffdc61b 100644 --- a/src/Lucene.Net/Codecs/StoredFieldsReader.cs +++ b/src/Lucene.Net/Codecs/StoredFieldsReader.cs @@ -31,7 +31,10 @@ namespace Lucene.Net.Codecs /// <para/> /// @lucene.experimental /// </summary> - public abstract class StoredFieldsReader : ICloneable, IDisposable + public abstract class StoredFieldsReader : IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// Sole constructor. (For invocation by subclass http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Codecs/TermVectorsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/TermVectorsReader.cs b/src/Lucene.Net/Codecs/TermVectorsReader.cs index 131e4c9..b705354 100644 --- a/src/Lucene.Net/Codecs/TermVectorsReader.cs +++ b/src/Lucene.Net/Codecs/TermVectorsReader.cs @@ -28,7 +28,10 @@ namespace Lucene.Net.Codecs /// <para/> /// @lucene.experimental /// </summary> - public abstract class TermVectorsReader : ICloneable, IDisposable + public abstract class TermVectorsReader : IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// Sole constructor. (For invocation by subclass http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs b/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs index 0a0bf59..b99a22d 100644 --- a/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs +++ b/src/Lucene.Net/Index/DocumentsWriterPerThreadPool.cs @@ -36,7 +36,10 @@ namespace Lucene.Net.Index /// is reusing the flushing <see cref="DocumentsWriterPerThread"/>s <see cref="ThreadState"/> with a /// new <see cref="DocumentsWriterPerThread"/> instance. /// </summary> - internal abstract class DocumentsWriterPerThreadPool : ICloneable + internal abstract class DocumentsWriterPerThreadPool +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary> /// <see cref="ThreadState"/> references and guards a http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/FlushPolicy.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/FlushPolicy.cs b/src/Lucene.Net/Index/FlushPolicy.cs index 1f9004d..817a0d0 100644 --- a/src/Lucene.Net/Index/FlushPolicy.cs +++ b/src/Lucene.Net/Index/FlushPolicy.cs @@ -52,7 +52,10 @@ namespace Lucene.Net.Index /// <seealso cref="DocumentsWriterFlushControl"/> /// <seealso cref="DocumentsWriterPerThread"/> /// <seealso cref="IndexWriterConfig.FlushPolicy"/> - internal abstract class FlushPolicy : ICloneable + internal abstract class FlushPolicy +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { protected LiveIndexWriterConfig m_indexWriterConfig; protected InfoStream m_infoStream; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/IMergeScheduler.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/IMergeScheduler.cs b/src/Lucene.Net/Index/IMergeScheduler.cs index 7f5b983..fbf8c26 100644 --- a/src/Lucene.Net/Index/IMergeScheduler.cs +++ b/src/Lucene.Net/Index/IMergeScheduler.cs @@ -21,9 +21,16 @@ namespace Lucene.Net.Index */ // LUCENENET specific - public interface IMergeScheduler : ICloneable, IDisposable + public interface IMergeScheduler : IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { [MethodImpl(MethodImplOptions.NoInlining)] void Merge(IndexWriter writer, MergeTrigger trigger, bool newMergesFound); + +#if !FEATURE_CLONEABLE + object Clone(); +#endif } } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/IndexDeletionPolicy.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/IndexDeletionPolicy.cs b/src/Lucene.Net/Index/IndexDeletionPolicy.cs index a416cc8..6f5ed44 100644 --- a/src/Lucene.Net/Index/IndexDeletionPolicy.cs +++ b/src/Lucene.Net/Index/IndexDeletionPolicy.cs @@ -52,7 +52,10 @@ namespace Lucene.Net.Index /// or <see cref="Store.Directory"/> instance.</para> /// </summary> - public abstract class IndexDeletionPolicy : ICloneable + public abstract class IndexDeletionPolicy +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary> /// Sole constructor, typically called by sub-classes constructors. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/IndexWriterConfig.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/IndexWriterConfig.cs b/src/Lucene.Net/Index/IndexWriterConfig.cs index 26dfd8e..bd9843e 100644 --- a/src/Lucene.Net/Index/IndexWriterConfig.cs +++ b/src/Lucene.Net/Index/IndexWriterConfig.cs @@ -66,7 +66,10 @@ namespace Lucene.Net.Index #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class IndexWriterConfig : LiveIndexWriterConfig, ICloneable + public sealed class IndexWriterConfig : LiveIndexWriterConfig +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { // LUCENENET specific: De-nested OpenMode enum from this class to prevent naming conflict http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/MergePolicy.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/MergePolicy.cs b/src/Lucene.Net/Index/MergePolicy.cs index 5519bc0..807687b 100644 --- a/src/Lucene.Net/Index/MergePolicy.cs +++ b/src/Lucene.Net/Index/MergePolicy.cs @@ -63,7 +63,10 @@ namespace Lucene.Net.Index /// /// @lucene.experimental /// </summary> - public abstract class MergePolicy : ICloneable, IDisposable + public abstract class MergePolicy : IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// A map of doc IDs. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/MergeScheduler.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/MergeScheduler.cs b/src/Lucene.Net/Index/MergeScheduler.cs index 1080178..c216c9c 100644 --- a/src/Lucene.Net/Index/MergeScheduler.cs +++ b/src/Lucene.Net/Index/MergeScheduler.cs @@ -30,7 +30,10 @@ namespace Lucene.Net.Index /// instance.</para> /// @lucene.experimental /// </summary> - public abstract class MergeScheduler : ICloneable, IDisposable, IMergeScheduler + public abstract class MergeScheduler : IDisposable, IMergeScheduler +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// Sole constructor. (For invocation by subclass http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/SegmentInfos.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/SegmentInfos.cs b/src/Lucene.Net/Index/SegmentInfos.cs index 3de75ba..2ad3398 100644 --- a/src/Lucene.Net/Index/SegmentInfos.cs +++ b/src/Lucene.Net/Index/SegmentInfos.cs @@ -111,7 +111,10 @@ namespace Lucene.Net.Index /// @lucene.experimental /// </summary> - public sealed class SegmentInfos : ICloneable, IEnumerable<SegmentCommitInfo> + public sealed class SegmentInfos : IEnumerable<SegmentCommitInfo> +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// The file format version for the segments_N codec header, up to 4.5. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Index/TermState.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Index/TermState.cs b/src/Lucene.Net/Index/TermState.cs index 5a52492..d1b4e26 100644 --- a/src/Lucene.Net/Index/TermState.cs +++ b/src/Lucene.Net/Index/TermState.cs @@ -27,7 +27,10 @@ namespace Lucene.Net.Index /// </summary> /// <seealso cref="TermsEnum.SeekExact(Lucene.Net.Util.BytesRef, TermState)"/> /// <seealso cref="TermsEnum.GetTermState()"/> - public abstract class TermState : ICloneable + public abstract class TermState +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary> /// Sole constructor. (For invocation by subclass http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Lucene.Net.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj index ff7e6bc..d16e822 100644 --- a/src/Lucene.Net/Lucene.Net.csproj +++ b/src/Lucene.Net/Lucene.Net.csproj @@ -67,8 +67,9 @@ <PackageReference Include="System.Threading.ThreadPool" Version="4.0.10" /> </ItemGroup> + <!-- NOTE: Microsoft's recommendation is not to use the ICloneable interface. We put in a FEATURE_CLONEABLE constant in case anyone wants to add it to the build --> <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> - <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_CLONEABLE;FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM;FEATURE_FILESTREAM_LOCK;FEATURE_SERIALIZABLE</DefineConstants> + <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM;FEATURE_FILESTREAM_LOCK;FEATURE_SERIALIZABLE</DefineConstants> <DebugType>portable</DebugType> </PropertyGroup> @@ -78,7 +79,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' "> - <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM;FEATURE_FILESTREAM_LOCK;FEATURE_SERIALIZABLE;FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants> + <DefineConstants>$(DefineConstants);FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM;FEATURE_FILESTREAM_LOCK;FEATURE_SERIALIZABLE;FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants> <DebugType>full</DebugType> </PropertyGroup> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Search/Query.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Query.cs b/src/Lucene.Net/Search/Query.cs index 38912a4..efe1e8f 100644 --- a/src/Lucene.Net/Search/Query.cs +++ b/src/Lucene.Net/Search/Query.cs @@ -48,7 +48,10 @@ namespace Lucene.Net.Search #if FEATURE_SERIALIZABLE [Serializable] #endif - public abstract class Query : ICloneable + public abstract class Query +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { // LUCENENET NOTE: We can't set the default boost in the constructor because the // Boost property can be overridden by subclasses (and possibly throw exceptions). http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Search/Spans/SpanNearQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs index e46f1cb..e7b1169 100644 --- a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs @@ -35,7 +35,10 @@ namespace Lucene.Net.Search.Spans /// maximum number of intervening unmatched positions, as well as whether /// matches are required to be in-order. /// </summary> - public class SpanNearQuery : SpanQuery, ICloneable + public class SpanNearQuery : SpanQuery +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { protected readonly IList<SpanQuery> m_clauses; protected int m_slop; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Search/Spans/SpanNotQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Spans/SpanNotQuery.cs b/src/Lucene.Net/Search/Spans/SpanNotQuery.cs index 60f6df9..5a63dd9 100644 --- a/src/Lucene.Net/Search/Spans/SpanNotQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanNotQuery.cs @@ -33,7 +33,10 @@ namespace Lucene.Net.Search.Spans /// Removes matches which overlap with another <see cref="SpanQuery"/> or /// within a x tokens before or y tokens after another <see cref="SpanQuery"/>. /// </summary> - public class SpanNotQuery : SpanQuery, ICloneable + public class SpanNotQuery : SpanQuery +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private SpanQuery include; private SpanQuery exclude; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Search/Spans/SpanOrQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs index 262faf9..0893ca9 100644 --- a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs @@ -32,7 +32,10 @@ namespace Lucene.Net.Search.Spans /// <summary> /// Matches the union of its clauses. </summary> - public class SpanOrQuery : SpanQuery, ICloneable + public class SpanOrQuery : SpanQuery +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private readonly EquatableList<SpanQuery> clauses; private string field; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs b/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs index aa24e5f..3c57cf2 100644 --- a/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs +++ b/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs @@ -29,7 +29,10 @@ namespace Lucene.Net.Search.Spans /// <summary> /// Base class for filtering a <see cref="SpanQuery"/> based on the position of a match. /// </summary> - public abstract class SpanPositionCheckQuery : SpanQuery, ICloneable + public abstract class SpanPositionCheckQuery : SpanQuery +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { protected SpanQuery m_match; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Store/DataInput.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Store/DataInput.cs b/src/Lucene.Net/Store/DataInput.cs index 33e16a8..c437462 100644 --- a/src/Lucene.Net/Store/DataInput.cs +++ b/src/Lucene.Net/Store/DataInput.cs @@ -34,7 +34,10 @@ namespace Lucene.Net.Store /// returning a new <see cref="DataInput"/> which operates on the same underlying /// resource, but positioned independently. /// </summary> - public abstract class DataInput : ICloneable + public abstract class DataInput +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { private const int SKIP_BUFFER_SIZE = 1024; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Store/IndexInput.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Store/IndexInput.cs b/src/Lucene.Net/Store/IndexInput.cs index 9c2c09f..074db28 100644 --- a/src/Lucene.Net/Store/IndexInput.cs +++ b/src/Lucene.Net/Store/IndexInput.cs @@ -34,7 +34,10 @@ namespace Lucene.Net.Store /// <see cref="ObjectDisposedException"/> when the original one is closed. /// </summary> /// <seealso cref="Directory"/> - public abstract class IndexInput : DataInput, ICloneable, IDisposable + public abstract class IndexInput : DataInput, IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private readonly string resourceDescription; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Store/RAMInputStream.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Store/RAMInputStream.cs b/src/Lucene.Net/Store/RAMInputStream.cs index 7d919be..5ac19f0 100644 --- a/src/Lucene.Net/Store/RAMInputStream.cs +++ b/src/Lucene.Net/Store/RAMInputStream.cs @@ -25,7 +25,10 @@ namespace Lucene.Net.Store /// <para/> /// @lucene.internal /// </summary> - public class RAMInputStream : IndexInput, ICloneable + public class RAMInputStream : IndexInput +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { internal const int BUFFER_SIZE = RAMOutputStream.BUFFER_SIZE; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Support/Compatibility/ICloneable.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/Compatibility/ICloneable.cs b/src/Lucene.Net/Support/Compatibility/ICloneable.cs deleted file mode 100644 index 64ed1fe..0000000 --- a/src/Lucene.Net/Support/Compatibility/ICloneable.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace System -{ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if !FEATURE_CLONEABLE - public interface ICloneable - { - object Clone(); - } -#endif -} http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Support/EquatableList.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/EquatableList.cs b/src/Lucene.Net/Support/EquatableList.cs index a503fae..4838136 100644 --- a/src/Lucene.Net/Support/EquatableList.cs +++ b/src/Lucene.Net/Support/EquatableList.cs @@ -33,7 +33,10 @@ namespace Lucene.Net.Support #if FEATURE_SERIALIZABLE [Serializable] #endif - public class EquatableList<T> : IList<T>, IEquatable<IList<T>>, ICloneable + public class EquatableList<T> : IList<T>, IEquatable<IList<T>> +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private readonly IList<T> list; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Support/EquatableSet.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/EquatableSet.cs b/src/Lucene.Net/Support/EquatableSet.cs index 222e1e9..8f5a58d 100644 --- a/src/Lucene.Net/Support/EquatableSet.cs +++ b/src/Lucene.Net/Support/EquatableSet.cs @@ -33,7 +33,10 @@ namespace Lucene.Net.Support #if FEATURE_SERIALIZABLE [Serializable] #endif - public class EquatableSet<T> : ISet<T>, IEquatable<ISet<T>>, ICloneable + public class EquatableSet<T> : ISet<T>, IEquatable<ISet<T>> +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { private readonly ISet<T> set; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/AttributeImpl.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/AttributeImpl.cs b/src/Lucene.Net/Util/AttributeImpl.cs index 5da5636..d52147a 100644 --- a/src/Lucene.Net/Util/AttributeImpl.cs +++ b/src/Lucene.Net/Util/AttributeImpl.cs @@ -29,7 +29,10 @@ namespace Lucene.Net.Util /// Attributes are used to add data in a dynamic, yet type-safe way to a source /// of usually streamed objects, e. g. a <see cref="Lucene.Net.Analysis.TokenStream" />. /// </summary> - public abstract class Attribute : IAttribute, ICloneable + public abstract class Attribute : IAttribute +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary> Clears the values in this <see cref="Attribute"/> and resets it to its /// default value. If this implementation implements more than one <see cref="Attribute"/> interface http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/AttributeSource.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/AttributeSource.cs b/src/Lucene.Net/Util/AttributeSource.cs index 98477a1..b46386a 100644 --- a/src/Lucene.Net/Util/AttributeSource.cs +++ b/src/Lucene.Net/Util/AttributeSource.cs @@ -101,7 +101,10 @@ namespace Lucene.Net.Util /// This class holds the state of an <see cref="AttributeSource"/>. </summary> /// <seealso cref="CaptureState()"/> /// <seealso cref="RestoreState(State)"/> - public sealed class State : ICloneable + public sealed class State +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { internal Attribute attribute; internal State next; http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/Automaton/Automaton.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/Automaton/Automaton.cs b/src/Lucene.Net/Util/Automaton/Automaton.cs index e475924..e319294 100644 --- a/src/Lucene.Net/Util/Automaton/Automaton.cs +++ b/src/Lucene.Net/Util/Automaton/Automaton.cs @@ -70,7 +70,10 @@ namespace Lucene.Net.Util.Automaton /// </para> /// @lucene.experimental /// </summary> - public class Automaton : ICloneable + public class Automaton +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary> /// Minimize using Hopcroft's O(n log n) algorithm. this is regarded as one of http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/Automaton/Transition.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/Automaton/Transition.cs b/src/Lucene.Net/Util/Automaton/Transition.cs index 54f820c..50bae03 100644 --- a/src/Lucene.Net/Util/Automaton/Transition.cs +++ b/src/Lucene.Net/Util/Automaton/Transition.cs @@ -43,7 +43,10 @@ namespace Lucene.Net.Util.Automaton /// <para/> /// @lucene.experimental /// </summary> - public class Transition : ICloneable + public class Transition +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /* * CLASS INVARIANT: min<=max http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/BytesRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/BytesRef.cs b/src/Lucene.Net/Util/BytesRef.cs index c327a4d..6bdd1a5 100644 --- a/src/Lucene.Net/Util/BytesRef.cs +++ b/src/Lucene.Net/Util/BytesRef.cs @@ -39,7 +39,10 @@ namespace Lucene.Net.Util #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class BytesRef : IComparable<BytesRef>, IComparable, ICloneable // LUCENENET specific - implemented IComparable for FieldComparator + public sealed class BytesRef : IComparable<BytesRef>, IComparable // LUCENENET specific - implemented IComparable for FieldComparator +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// An empty byte array for convenience </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/CharsRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/CharsRef.cs b/src/Lucene.Net/Util/CharsRef.cs index 51e1228..b47cb0b 100644 --- a/src/Lucene.Net/Util/CharsRef.cs +++ b/src/Lucene.Net/Util/CharsRef.cs @@ -33,7 +33,10 @@ namespace Lucene.Net.Util #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class CharsRef : IComparable<CharsRef>, ICharSequence, ICloneable + public sealed class CharsRef : IComparable<CharsRef>, ICharSequence +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// An empty character array for convenience </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/InfoStream.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/InfoStream.cs b/src/Lucene.Net/Util/InfoStream.cs index 7794fe8..c017bb2 100644 --- a/src/Lucene.Net/Util/InfoStream.cs +++ b/src/Lucene.Net/Util/InfoStream.cs @@ -29,7 +29,10 @@ namespace Lucene.Net.Util /// </para> /// @lucene.internal /// </summary> - public abstract class InfoStream : ICloneable, IDisposable + public abstract class InfoStream : IDisposable +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// Instance of <see cref="InfoStream"/> that does no logging at all. </summary> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/IntsRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/IntsRef.cs b/src/Lucene.Net/Util/IntsRef.cs index d13dc9b..2bc7f9d 100644 --- a/src/Lucene.Net/Util/IntsRef.cs +++ b/src/Lucene.Net/Util/IntsRef.cs @@ -35,7 +35,10 @@ namespace Lucene.Net.Util #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class Int32sRef : IComparable<Int32sRef>, ICloneable + public sealed class Int32sRef : IComparable<Int32sRef> +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// An empty integer array for convenience. http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/LongsRef.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/LongsRef.cs b/src/Lucene.Net/Util/LongsRef.cs index 6bce847..7a1f976 100644 --- a/src/Lucene.Net/Util/LongsRef.cs +++ b/src/Lucene.Net/Util/LongsRef.cs @@ -35,7 +35,10 @@ namespace Lucene.Net.Util #if FEATURE_SERIALIZABLE [Serializable] #endif - public sealed class Int64sRef : IComparable<Int64sRef>, ICloneable + public sealed class Int64sRef : IComparable<Int64sRef> +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { /// <summary> /// An empty <see cref="long"/> array for convenience http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/OpenBitSet.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/OpenBitSet.cs b/src/Lucene.Net/Util/OpenBitSet.cs index cd6276d..9f1f14b 100644 --- a/src/Lucene.Net/Util/OpenBitSet.cs +++ b/src/Lucene.Net/Util/OpenBitSet.cs @@ -77,7 +77,10 @@ namespace Lucene.Net.Util /// </item> /// </list> /// </summary> - public class OpenBitSet : DocIdSet, IBits, ICloneable + public class OpenBitSet : DocIdSet, IBits +#if FEATURE_CLONEABLE + , System.ICloneable +#endif { protected internal long[] m_bits; protected internal int m_wlen; // number of words (elements) used in the array http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/Lucene.Net/Util/SetOnce.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/SetOnce.cs b/src/Lucene.Net/Util/SetOnce.cs index b716087..ad09116 100644 --- a/src/Lucene.Net/Util/SetOnce.cs +++ b/src/Lucene.Net/Util/SetOnce.cs @@ -32,7 +32,10 @@ namespace Lucene.Net.Util /// <para/> /// @lucene.experimental /// </summary> - public sealed class SetOnce<T> : ICloneable + public sealed class SetOnce<T> +#if FEATURE_CLONEABLE + : System.ICloneable +#endif where T : class // LUCENENET specific - added class constraint so we don't accept value types (which cannot be volatile) { private volatile T obj = default(T); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj ---------------------------------------------------------------------- diff --git a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj index 958a504..bf3e052 100644 --- a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj +++ b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj @@ -82,6 +82,7 @@ <PackageReference Include="icu.net" Version="54.1.1-alpha" /> </ItemGroup> + <!-- NOTE: Microsoft's recommendation is not to use the ICloneable interface. We put in a FEATURE_CLONEABLE constant in case anyone wants to add it to the build --> <!--<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> <DebugType>portable</DebugType> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/94d0291f/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs ---------------------------------------------------------------------- diff --git a/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs b/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs index 1ffbcc5..261fe07 100644 --- a/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs +++ b/src/dotnet/Lucene.Net.ICU/Support/BreakIterator.cs @@ -26,7 +26,10 @@ namespace Lucene.Net.Support /// maintain a current position and scan over text /// returning the index of characters where boundaries occur. /// </summary> - public abstract class BreakIterator : ICloneable + public abstract class BreakIterator +#if FEATURE_CLONEABLE + : System.ICloneable +#endif { /// <summary> /// Constructor. BreakIterator is stateless and has no default behavior.
