You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/09/09 00:31:27 UTC
[09/50] [abbrv] lucenenet git commit: This reverts commit
1a8c4a116f8870479e85737bfecb8fe673e8347b (SWEEP: Lucene.Net.Core: Marked most
(stateful) classes serializable)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/NearSpansUnordered.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/NearSpansUnordered.cs b/src/Lucene.Net/Search/Spans/NearSpansUnordered.cs
index 40c4d6c..13c1abf 100644
--- a/src/Lucene.Net/Search/Spans/NearSpansUnordered.cs
+++ b/src/Lucene.Net/Search/Spans/NearSpansUnordered.cs
@@ -33,9 +33,6 @@ namespace Lucene.Net.Search.Spans
/// Expert:
/// Only public for subclassing. Most implementations should not need this class
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class NearSpansUnordered : Spans
{
private SpanNearQuery query;
@@ -55,9 +52,6 @@ namespace Lucene.Net.Search.Spans
private bool more = true; // true iff not done
private bool firstTime = true; // true before first next()
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class CellQueue : Util.PriorityQueue<SpansCell>
{
private readonly NearSpansUnordered outerInstance;
@@ -83,9 +77,6 @@ namespace Lucene.Net.Search.Spans
/// <summary>
/// Wraps a <see cref="Spans"/>, and can be used to form a linked list. </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class SpansCell : Spans
{
private readonly NearSpansUnordered outerInstance;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs b/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs
index 6a7b402..90d7c42 100644
--- a/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanFirstQuery.cs
@@ -1,5 +1,4 @@
using Lucene.Net.Support;
-using System;
using System.Diagnostics;
using System.Text;
@@ -30,9 +29,6 @@ namespace Lucene.Net.Search.Spans
/// This class is a simple extension of <see cref="SpanPositionRangeQuery"/> in that it assumes the
/// start to be zero and only checks the end boundary.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanFirstQuery : SpanPositionRangeQuery
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanMultiTermQueryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanMultiTermQueryWrapper.cs b/src/Lucene.Net/Search/Spans/SpanMultiTermQueryWrapper.cs
index f52ece5..1c6466b 100644
--- a/src/Lucene.Net/Search/Spans/SpanMultiTermQueryWrapper.cs
+++ b/src/Lucene.Net/Search/Spans/SpanMultiTermQueryWrapper.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Text;
@@ -41,9 +40,6 @@ namespace Lucene.Net.Search.Spans
/// // do something with spanWildcard, such as use it in a SpanFirstQuery
/// </code>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanMultiTermQueryWrapper<Q> : SpanQuery, ISpanMultiTermQueryWrapper where Q : MultiTermQuery
{
protected readonly Q m_query;
@@ -182,9 +178,6 @@ namespace Lucene.Net.Search.Spans
/// <seealso cref="MultiTermRewriteMethod"/>
public static readonly SpanRewriteMethod SCORING_SPAN_QUERY_REWRITE = new SpanRewriteMethodAnonymousInnerClassHelper();
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class SpanRewriteMethodAnonymousInnerClassHelper : SpanRewriteMethod
{
public SpanRewriteMethodAnonymousInnerClassHelper()
@@ -193,9 +186,6 @@ namespace Lucene.Net.Search.Spans
private readonly ScoringRewrite<SpanOrQuery> @delegate = new ScoringRewriteAnonymousInnerClassHelper();
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class ScoringRewriteAnonymousInnerClassHelper : ScoringRewrite<SpanOrQuery>
{
public ScoringRewriteAnonymousInnerClassHelper()
@@ -239,9 +229,6 @@ namespace Lucene.Net.Search.Spans
/// the boolean max clause count.
/// </summary>
/// <seealso cref="MultiTermRewriteMethod"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class TopTermsSpanBooleanQueryRewrite : SpanRewriteMethod
{
private readonly TopTermsRewrite<SpanOrQuery> @delegate;
@@ -255,9 +242,6 @@ namespace Lucene.Net.Search.Spans
@delegate = new TopTermsRewriteAnonymousInnerClassHelper(this, size);
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class TopTermsRewriteAnonymousInnerClassHelper : TopTermsRewrite<SpanOrQuery>
{
private readonly TopTermsSpanBooleanQueryRewrite outerInstance;
@@ -335,9 +319,6 @@ namespace Lucene.Net.Search.Spans
/// <summary>
/// Abstract class that defines how the query is rewritten. </summary>
// LUCENENET specific - moved this class outside of SpanMultiTermQueryWrapper<Q>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class SpanRewriteMethod : MultiTermQuery.RewriteMethod
{
public override abstract Query Rewrite(IndexReader reader, MultiTermQuery query);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs b/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs
index b86e5d8..9954a82 100644
--- a/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanNearPayloadCheckQuery.cs
@@ -1,6 +1,5 @@
using Lucene.Net.Support;
using System.Collections.Generic;
-using System;
using System.Linq;
using System.Text;
@@ -29,9 +28,6 @@ namespace Lucene.Net.Search.Spans
/// Only return those matches that have a specific payload at
/// the given position.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanNearPayloadCheckQuery : SpanPositionCheckQuery
{
protected readonly ICollection<byte[]> m_payloadToMatch;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/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 0ad2cb3..ca47212 100644
--- a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs
@@ -35,9 +35,6 @@ namespace Lucene.Net.Search.Spans
/// maximum number of intervening unmatched positions, as well as whether
/// matches are required to be in-order.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanNearQuery : SpanQuery
{
protected readonly IList<SpanQuery> m_clauses;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/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 bb69f28..50395ff 100644
--- a/src/Lucene.Net/Search/Spans/SpanNotQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanNotQuery.cs
@@ -33,9 +33,6 @@ 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>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanNotQuery : SpanQuery
{
private SpanQuery include;
@@ -141,9 +138,6 @@ namespace Lucene.Net.Search.Spans
return new SpansAnonymousInnerClassHelper(this, context, acceptDocs, termContexts);
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class SpansAnonymousInnerClassHelper : Spans
{
private readonly SpanNotQuery outerInstance;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/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 0d18490..fe2329b 100644
--- a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs
@@ -32,9 +32,6 @@ namespace Lucene.Net.Search.Spans
/// <summary>
/// Matches the union of its clauses. </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanOrQuery : SpanQuery
{
private readonly EquatableList<SpanQuery> clauses;
@@ -178,9 +175,6 @@ namespace Lucene.Net.Search.Spans
return h;
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class SpanQueue : Util.PriorityQueue<Spans>
{
private readonly SpanOrQuery outerInstance;
@@ -221,9 +215,6 @@ namespace Lucene.Net.Search.Spans
return new SpansAnonymousInnerClassHelper(this, context, acceptDocs, termContexts);
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class SpansAnonymousInnerClassHelper : Spans
{
private readonly SpanOrQuery outerInstance;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs b/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs
index 0a68745..c9928ad 100644
--- a/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanPayloadCheckQuery.cs
@@ -32,9 +32,6 @@ namespace Lucene.Net.Search.Spans
/// <see cref="SpanNearPayloadCheckQuery"/> since it properly handles the fact that payloads
/// aren't ordered by <see cref="Lucene.Net.Search.Spans.SpanNearQuery"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanPayloadCheckQuery : SpanPositionCheckQuery
{
protected readonly ICollection<byte[]> m_payloadToMatch;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/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 ec66553..24680ec 100644
--- a/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanPositionCheckQuery.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
namespace Lucene.Net.Search.Spans
@@ -29,9 +28,6 @@ namespace Lucene.Net.Search.Spans
/// <summary>
/// Base class for filtering a <see cref="SpanQuery"/> based on the position of a match.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class SpanPositionCheckQuery : SpanQuery
{
protected SpanQuery m_match;
@@ -124,9 +120,6 @@ namespace Lucene.Net.Search.Spans
}
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
protected class PositionCheckSpan : Spans
{
private readonly SpanPositionCheckQuery outerInstance;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs b/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs
index 4eb3285..7e4c33a 100644
--- a/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanPositionRangeQuery.cs
@@ -1,5 +1,4 @@
using Lucene.Net.Support;
-using System;
using System.Diagnostics;
using System.Text;
@@ -28,9 +27,6 @@ namespace Lucene.Net.Search.Spans
/// Checks to see if the <see cref="SpanPositionCheckQuery.Match"/> lies between a start and end position
/// </summary>
/// <seealso cref="Lucene.Net.Search.Spans.SpanFirstQuery">for a derivation that is optimized for the case where start position is 0</seealso>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanPositionRangeQuery : SpanPositionCheckQuery
{
protected int m_start = 0;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanQuery.cs b/src/Lucene.Net/Search/Spans/SpanQuery.cs
index 976b343..1c11297 100644
--- a/src/Lucene.Net/Search/Spans/SpanQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanQuery.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
namespace Lucene.Net.Search.Spans
@@ -27,9 +26,6 @@ namespace Lucene.Net.Search.Spans
/// <summary>
/// Base class for span-based queries. </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class SpanQuery : Query
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanScorer.cs b/src/Lucene.Net/Search/Spans/SpanScorer.cs
index cf13628..48aa75d 100644
--- a/src/Lucene.Net/Search/Spans/SpanScorer.cs
+++ b/src/Lucene.Net/Search/Spans/SpanScorer.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Search.Spans
{
/*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Spans
/// <summary>
/// Public for extension only.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanScorer : Scorer
{
protected Spans m_spans;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanTermQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanTermQuery.cs b/src/Lucene.Net/Search/Spans/SpanTermQuery.cs
index 71bd0c5..5a54018 100644
--- a/src/Lucene.Net/Search/Spans/SpanTermQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanTermQuery.cs
@@ -35,9 +35,6 @@ namespace Lucene.Net.Search.Spans
/// <summary>
/// Matches spans containing a term. </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanTermQuery : SpanQuery
{
protected Term m_term;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/SpanWeight.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/SpanWeight.cs b/src/Lucene.Net/Search/Spans/SpanWeight.cs
index 03544ad..ca26201 100644
--- a/src/Lucene.Net/Search/Spans/SpanWeight.cs
+++ b/src/Lucene.Net/Search/Spans/SpanWeight.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
namespace Lucene.Net.Search.Spans
@@ -30,9 +29,6 @@ namespace Lucene.Net.Search.Spans
/// <summary>
/// Expert-only. Public for use by other weight implementations
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SpanWeight : Weight
{
protected Similarity m_similarity;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/Spans.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/Spans.cs b/src/Lucene.Net/Search/Spans/Spans.cs
index df9ef5d..b1b6ab5 100644
--- a/src/Lucene.Net/Search/Spans/Spans.cs
+++ b/src/Lucene.Net/Search/Spans/Spans.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
namespace Lucene.Net.Search.Spans
@@ -26,9 +25,6 @@ namespace Lucene.Net.Search.Spans
/// are enumerated in order, by increasing document number, within that by
/// increasing start position and finally by increasing end position.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class Spans
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/TermSpans.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/TermSpans.cs b/src/Lucene.Net/Search/Spans/TermSpans.cs
index fc4a403..6fc28c9 100644
--- a/src/Lucene.Net/Search/Spans/TermSpans.cs
+++ b/src/Lucene.Net/Search/Spans/TermSpans.cs
@@ -28,9 +28,6 @@ namespace Lucene.Net.Search.Spans
/// Expert:
/// Public for extension only
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class TermSpans : Spans
{
protected readonly DocsAndPositionsEnum m_postings;
@@ -154,9 +151,6 @@ namespace Lucene.Net.Search.Spans
}
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private sealed class EmptyTermSpans : TermSpans
{
public override bool Next()
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TermCollectingRewrite.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TermCollectingRewrite.cs b/src/Lucene.Net/Search/TermCollectingRewrite.cs
index aac93b2..1b31817 100644
--- a/src/Lucene.Net/Search/TermCollectingRewrite.cs
+++ b/src/Lucene.Net/Search/TermCollectingRewrite.cs
@@ -32,9 +32,6 @@ namespace Lucene.Net.Search
using Terms = Lucene.Net.Index.Terms;
using TermsEnum = Lucene.Net.Index.TermsEnum;
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class TermCollectingRewrite<Q> : MultiTermQuery.RewriteMethod where Q : Query // LUCENENET NOTE: Class was made public instaed of internal because it has public derived types
{
/// <summary>
@@ -98,9 +95,6 @@ namespace Lucene.Net.Search
}
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
internal abstract class TermCollector
{
protected internal AtomicReaderContext m_readerContext;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TermQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TermQuery.cs b/src/Lucene.Net/Search/TermQuery.cs
index aee74a8..07d6ffb 100644
--- a/src/Lucene.Net/Search/TermQuery.cs
+++ b/src/Lucene.Net/Search/TermQuery.cs
@@ -50,9 +50,6 @@ namespace Lucene.Net.Search
private readonly int docFreq;
private readonly TermContext perReaderTermState;
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
internal sealed class TermWeight : Weight
{
private readonly TermQuery outerInstance;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TermRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TermRangeFilter.cs b/src/Lucene.Net/Search/TermRangeFilter.cs
index 128ac8a..a8d5a33 100644
--- a/src/Lucene.Net/Search/TermRangeFilter.cs
+++ b/src/Lucene.Net/Search/TermRangeFilter.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Search
{
/*
@@ -35,9 +33,6 @@ namespace Lucene.Net.Search
/// <para/>
/// @since 2.9
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class TermRangeFilter : MultiTermQueryWrapperFilter<TermRangeQuery>
{
/// <param name="fieldName"> The field this range applies to </param>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TermRangeQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TermRangeQuery.cs b/src/Lucene.Net/Search/TermRangeQuery.cs
index 87c7579..1df0e24 100644
--- a/src/Lucene.Net/Search/TermRangeQuery.cs
+++ b/src/Lucene.Net/Search/TermRangeQuery.cs
@@ -41,9 +41,7 @@ namespace Lucene.Net.Search
/// <para/>
/// @since 2.9
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
+
public class TermRangeQuery : MultiTermQuery
{
private BytesRef lowerTerm;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TermRangeTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TermRangeTermsEnum.cs b/src/Lucene.Net/Search/TermRangeTermsEnum.cs
index f1b2381..23d0e41 100644
--- a/src/Lucene.Net/Search/TermRangeTermsEnum.cs
+++ b/src/Lucene.Net/Search/TermRangeTermsEnum.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
namespace Lucene.Net.Search
@@ -31,9 +30,6 @@ namespace Lucene.Net.Search
/// <see cref="FilteredTermsEnum.Comparer"/>. Each term in the enumeration is
/// greater than all that precede it.</para>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class TermRangeTermsEnum : FilteredTermsEnum
{
private readonly bool includeLower;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TermScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TermScorer.cs b/src/Lucene.Net/Search/TermScorer.cs
index bf71c84..96253f0 100644
--- a/src/Lucene.Net/Search/TermScorer.cs
+++ b/src/Lucene.Net/Search/TermScorer.cs
@@ -1,4 +1,3 @@
-using System;
using System.Diagnostics;
namespace Lucene.Net.Search
@@ -26,9 +25,6 @@ namespace Lucene.Net.Search
/// <summary>
/// Expert: A <see cref="Scorer"/> for documents matching a <see cref="Index.Term"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
internal sealed class TermScorer : Scorer
{
private readonly DocsEnum docsEnum;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TermStatistics.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TermStatistics.cs b/src/Lucene.Net/Search/TermStatistics.cs
index 5bb162f..6a35bc2 100644
--- a/src/Lucene.Net/Search/TermStatistics.cs
+++ b/src/Lucene.Net/Search/TermStatistics.cs
@@ -1,4 +1,3 @@
-using System;
using System.Diagnostics;
namespace Lucene.Net.Search
@@ -27,9 +26,6 @@ namespace Lucene.Net.Search
/// <para/>
/// @lucene.experimental
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class TermStatistics
{
private readonly BytesRef term;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TimeLimitingCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TimeLimitingCollector.cs b/src/Lucene.Net/Search/TimeLimitingCollector.cs
index ec24773..b050ffc 100644
--- a/src/Lucene.Net/Search/TimeLimitingCollector.cs
+++ b/src/Lucene.Net/Search/TimeLimitingCollector.cs
@@ -33,9 +33,6 @@ namespace Lucene.Net.Search
/// exceeded, the search thread is stopped by throwing a
/// <see cref="TimeExceededException"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class TimeLimitingCollector : ICollector
{
/// <summary>
@@ -273,9 +270,6 @@ namespace Lucene.Net.Search
}
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private sealed class TimerThreadHolder
{
internal static readonly TimerThread THREAD;
@@ -293,9 +287,6 @@ namespace Lucene.Net.Search
/// <para/>
/// @lucene.experimental
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class TimerThread : ThreadClass
{
public const string THREAD_NAME = "TimeLimitedCollector timer thread";
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TopDocs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TopDocs.cs b/src/Lucene.Net/Search/TopDocs.cs
index fec0de7..55bf088 100644
--- a/src/Lucene.Net/Search/TopDocs.cs
+++ b/src/Lucene.Net/Search/TopDocs.cs
@@ -27,9 +27,6 @@ namespace Lucene.Net.Search
/// <see cref="IndexSearcher.Search(Query,Filter,int)"/> and
/// <see cref="IndexSearcher.Search(Query,int)"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class TopDocs
{
/// <summary>
@@ -77,9 +74,6 @@ namespace Lucene.Net.Search
}
// Refers to one hit:
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class ShardRef
{
// Which shard (index into shardHits[]):
@@ -101,9 +95,6 @@ namespace Lucene.Net.Search
// Specialized MergeSortQueue that just merges by
// relevance score, descending:
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class ScoreMergeSortQueue : Util.PriorityQueue<ShardRef>
{
internal readonly ScoreDoc[][] shardHits;
@@ -155,9 +146,6 @@ namespace Lucene.Net.Search
}
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class MergeSortQueue : Util.PriorityQueue<ShardRef>
{
// These are really FieldDoc instances:
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TopDocsCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TopDocsCollector.cs b/src/Lucene.Net/Search/TopDocsCollector.cs
index cb8b956..246daa3 100644
--- a/src/Lucene.Net/Search/TopDocsCollector.cs
+++ b/src/Lucene.Net/Search/TopDocsCollector.cs
@@ -33,9 +33,6 @@ namespace Lucene.Net.Search
/// however, you might want to consider overriding all methods, in order to avoid
/// a <see cref="NullReferenceException"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class TopDocsCollector<T> : ICollector, ITopDocsCollector where T : ScoreDoc
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TopFieldCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TopFieldCollector.cs b/src/Lucene.Net/Search/TopFieldCollector.cs
index 34911b0..d24f98f 100644
--- a/src/Lucene.Net/Search/TopFieldCollector.cs
+++ b/src/Lucene.Net/Search/TopFieldCollector.cs
@@ -1,5 +1,4 @@
using Lucene.Net.Util;
-using System;
namespace Lucene.Net.Search
{
@@ -32,9 +31,6 @@ namespace Lucene.Net.Search
/// <para/>
/// @lucene.experimental
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class TopFieldCollector : TopDocsCollector<Entry>
{
// TODO: one optimization we could do is to pre-fill
@@ -46,9 +42,6 @@ namespace Lucene.Net.Search
/// Implements a <see cref="TopFieldCollector"/> over one <see cref="SortField"/> criteria, without
/// tracking document scores and maxScore.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OneComparerNonScoringCollector : TopFieldCollector
{
internal FieldComparer comparer;
@@ -120,9 +113,6 @@ namespace Lucene.Net.Search
/// tracking document scores and maxScore, and assumes out of orderness in doc
/// Ids collection.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OutOfOrderOneComparerNonScoringCollector : OneComparerNonScoringCollector
{
public OutOfOrderOneComparerNonScoringCollector(FieldValueHitQueue<Entry> queue, int numHits, bool fillFields)
@@ -171,9 +161,6 @@ namespace Lucene.Net.Search
/// Implements a <see cref="TopFieldCollector"/> over one <see cref="SortField"/> criteria, while tracking
/// document scores but no maxScore.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OneComparerScoringNoMaxScoreCollector : OneComparerNonScoringCollector
{
internal Scorer scorer;
@@ -240,9 +227,6 @@ namespace Lucene.Net.Search
/// document scores but no maxScore, and assumes out of orderness in doc Ids
/// collection.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OutOfOrderOneComparerScoringNoMaxScoreCollector : OneComparerScoringNoMaxScoreCollector
{
public OutOfOrderOneComparerScoringNoMaxScoreCollector(FieldValueHitQueue<Entry> queue, int numHits, bool fillFields)
@@ -297,9 +281,6 @@ namespace Lucene.Net.Search
/// Implements a <see cref="TopFieldCollector"/> over one <see cref="SortField"/> criteria, with tracking
/// document scores and maxScore.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OneComparerScoringMaxScoreCollector : OneComparerNonScoringCollector
{
internal Scorer scorer;
@@ -367,9 +348,6 @@ namespace Lucene.Net.Search
/// document scores and maxScore, and assumes out of orderness in doc Ids
/// collection.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OutOfOrderOneComparerScoringMaxScoreCollector : OneComparerScoringMaxScoreCollector
{
public OutOfOrderOneComparerScoringMaxScoreCollector(FieldValueHitQueue<Entry> queue, int numHits, bool fillFields)
@@ -423,9 +401,6 @@ namespace Lucene.Net.Search
/// Implements a <see cref="TopFieldCollector"/> over multiple <see cref="SortField"/> criteria, without
/// tracking document scores and maxScore.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class MultiComparerNonScoringCollector : TopFieldCollector
{
internal readonly FieldComparer[] comparers;
@@ -532,9 +507,6 @@ namespace Lucene.Net.Search
/// tracking document scores and maxScore, and assumes out of orderness in doc
/// Ids collection.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OutOfOrderMultiComparerNonScoringCollector : MultiComparerNonScoringCollector
{
public OutOfOrderMultiComparerNonScoringCollector(FieldValueHitQueue<Entry> queue, int numHits, bool fillFields)
@@ -616,9 +588,6 @@ namespace Lucene.Net.Search
/// Implements a <see cref="TopFieldCollector"/> over multiple <see cref="SortField"/> criteria, with
/// tracking document scores and maxScore.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class MultiComparerScoringMaxScoreCollector : MultiComparerNonScoringCollector
{
internal Scorer scorer;
@@ -715,9 +684,6 @@ namespace Lucene.Net.Search
/// tracking document scores and maxScore, and assumes out of orderness in doc
/// Ids collection.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private sealed class OutOfOrderMultiComparerScoringMaxScoreCollector : MultiComparerScoringMaxScoreCollector
{
public OutOfOrderMultiComparerScoringMaxScoreCollector(FieldValueHitQueue<Entry> queue, int numHits, bool fillFields)
@@ -804,9 +770,6 @@ namespace Lucene.Net.Search
/// Implements a <see cref="TopFieldCollector"/> over multiple <see cref="SortField"/> criteria, with
/// tracking document scores and maxScore.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class MultiComparerScoringNoMaxScoreCollector : MultiComparerNonScoringCollector
{
internal Scorer scorer;
@@ -901,9 +864,6 @@ namespace Lucene.Net.Search
/// tracking document scores and maxScore, and assumes out of orderness in doc
/// Ids collection.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private sealed class OutOfOrderMultiComparerScoringNoMaxScoreCollector : MultiComparerScoringNoMaxScoreCollector
{
public OutOfOrderMultiComparerScoringNoMaxScoreCollector(FieldValueHitQueue<Entry> queue, int numHits, bool fillFields)
@@ -995,9 +955,6 @@ namespace Lucene.Net.Search
/// <summary>
/// Implements a <see cref="TopFieldCollector"/> when after != null.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private sealed class PagingFieldCollector : TopFieldCollector
{
internal Scorer scorer;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TopFieldDocs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TopFieldDocs.cs b/src/Lucene.Net/Search/TopFieldDocs.cs
index f0dcd68..d143e00 100644
--- a/src/Lucene.Net/Search/TopFieldDocs.cs
+++ b/src/Lucene.Net/Search/TopFieldDocs.cs
@@ -1,5 +1,4 @@
using Lucene.Net.Support;
-using System;
using System.Diagnostics.CodeAnalysis;
namespace Lucene.Net.Search
@@ -25,9 +24,6 @@ namespace Lucene.Net.Search
/// Represents hits returned by
/// <see cref="IndexSearcher.Search(Query, Filter, int, Sort)"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class TopFieldDocs : TopDocs
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TopScoreDocCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TopScoreDocCollector.cs b/src/Lucene.Net/Search/TopScoreDocCollector.cs
index 53ec973..8c3edb0 100644
--- a/src/Lucene.Net/Search/TopScoreDocCollector.cs
+++ b/src/Lucene.Net/Search/TopScoreDocCollector.cs
@@ -1,4 +1,3 @@
-using System;
using System.Diagnostics;
namespace Lucene.Net.Search
@@ -35,15 +34,9 @@ namespace Lucene.Net.Search
/// collector will not properly collect hits with such
/// scores.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class TopScoreDocCollector : TopDocsCollector<ScoreDoc>
{
// Assumes docs are scored in order.
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class InOrderTopScoreDocCollector : TopScoreDocCollector
{
internal InOrderTopScoreDocCollector(int numHits)
@@ -79,9 +72,6 @@ namespace Lucene.Net.Search
}
// Assumes docs are scored in order.
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class InOrderPagingScoreDocCollector : TopScoreDocCollector
{
internal readonly ScoreDoc after;
@@ -149,9 +139,6 @@ namespace Lucene.Net.Search
}
// Assumes docs are scored out of order.
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OutOfOrderTopScoreDocCollector : TopScoreDocCollector
{
internal OutOfOrderTopScoreDocCollector(int numHits)
@@ -190,9 +177,6 @@ namespace Lucene.Net.Search
}
// Assumes docs are scored out of order.
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class OutOfOrderPagingScoreDocCollector : TopScoreDocCollector
{
internal readonly ScoreDoc after;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TopTermsRewrite.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TopTermsRewrite.cs b/src/Lucene.Net/Search/TopTermsRewrite.cs
index dd5db58..35caff3 100644
--- a/src/Lucene.Net/Search/TopTermsRewrite.cs
+++ b/src/Lucene.Net/Search/TopTermsRewrite.cs
@@ -42,9 +42,6 @@ namespace Lucene.Net.Search
/// <para/>
/// @lucene.internal - Only public to be accessible by spans package.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class TopTermsRewrite<Q> : TermCollectingRewrite<Q>, ITopTermsRewrite
where Q : Query
{
@@ -98,9 +95,6 @@ namespace Lucene.Net.Search
return q;
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class TermCollectorAnonymousInnerClassHelper : TermCollector
{
private readonly TopTermsRewrite<Q> outerInstance;
@@ -256,9 +250,6 @@ namespace Lucene.Net.Search
private static readonly IComparer<ScoreTerm> scoreTermSortByTermComp = new ComparerAnonymousInnerClassHelper();
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class ComparerAnonymousInnerClassHelper : IComparer<ScoreTerm>
{
public ComparerAnonymousInnerClassHelper()
@@ -272,9 +263,6 @@ namespace Lucene.Net.Search
}
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
internal sealed class ScoreTerm : IComparable<ScoreTerm>
{
public IComparer<BytesRef> TermComp { get; private set; }
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/TotalHitCountCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TotalHitCountCollector.cs b/src/Lucene.Net/Search/TotalHitCountCollector.cs
index 70a7f25..0d47820 100644
--- a/src/Lucene.Net/Search/TotalHitCountCollector.cs
+++ b/src/Lucene.Net/Search/TotalHitCountCollector.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Search
{
/*
@@ -24,9 +22,7 @@ namespace Lucene.Net.Search
/// <summary>
/// Just counts the total number of hits.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
+
public class TotalHitCountCollector : ICollector
{
private int totalHits;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Weight.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Weight.cs b/src/Lucene.Net/Search/Weight.cs
index c977afd..7fceace 100644
--- a/src/Lucene.Net/Search/Weight.cs
+++ b/src/Lucene.Net/Search/Weight.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Search
{
/*
@@ -54,9 +52,6 @@ namespace Lucene.Net.Search
/// <para/>
/// @since 2.9
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class Weight
{
/// <summary>
@@ -145,9 +140,6 @@ namespace Lucene.Net.Search
/// <summary>
/// Just wraps a <see cref="Scorer"/> and performs top scoring using it. </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
internal class DefaultBulkScorer : BulkScorer
{
internal readonly Scorer scorer;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/WildcardQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/WildcardQuery.cs b/src/Lucene.Net/Search/WildcardQuery.cs
index 4a76450..560e0c2 100644
--- a/src/Lucene.Net/Search/WildcardQuery.cs
+++ b/src/Lucene.Net/Search/WildcardQuery.cs
@@ -42,9 +42,6 @@ namespace Lucene.Net.Search
/// rewrite method.
/// </summary>
/// <seealso cref="AutomatonQuery"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class WildcardQuery : AutomatonQuery
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/BaseDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/BaseDirectory.cs b/src/Lucene.Net/Store/BaseDirectory.cs
index 7287db5..6c0592e 100644
--- a/src/Lucene.Net/Store/BaseDirectory.cs
+++ b/src/Lucene.Net/Store/BaseDirectory.cs
@@ -26,9 +26,6 @@ namespace Lucene.Net.Store
/// <para/>
/// @lucene.experimental
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class BaseDirectory : Directory
{
private volatile bool isOpen = true;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/BufferedChecksum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/BufferedChecksum.cs b/src/Lucene.Net/Store/BufferedChecksum.cs
index 54cb280..6240ce4 100644
--- a/src/Lucene.Net/Store/BufferedChecksum.cs
+++ b/src/Lucene.Net/Store/BufferedChecksum.cs
@@ -1,5 +1,4 @@
using Lucene.Net.Support;
-using System;
namespace Lucene.Net.Store
{
@@ -24,9 +23,6 @@ namespace Lucene.Net.Store
/// Wraps another <see cref="IChecksum"/> with an internal buffer
/// to speed up checksum calculations.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class BufferedChecksum : IChecksum
{
private readonly IChecksum @in;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/BufferedChecksumIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/BufferedChecksumIndexInput.cs b/src/Lucene.Net/Store/BufferedChecksumIndexInput.cs
index 1099419..8cc7bb9 100644
--- a/src/Lucene.Net/Store/BufferedChecksumIndexInput.cs
+++ b/src/Lucene.Net/Store/BufferedChecksumIndexInput.cs
@@ -24,9 +24,6 @@ namespace Lucene.Net.Store
/// Simple implementation of <see cref="ChecksumIndexInput"/> that wraps
/// another input and delegates calls.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class BufferedChecksumIndexInput : ChecksumIndexInput
{
internal readonly IndexInput main;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/BufferedIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/BufferedIndexInput.cs b/src/Lucene.Net/Store/BufferedIndexInput.cs
index ed133c5..ee6e2ba 100644
--- a/src/Lucene.Net/Store/BufferedIndexInput.cs
+++ b/src/Lucene.Net/Store/BufferedIndexInput.cs
@@ -23,9 +23,6 @@ namespace Lucene.Net.Store
/// <summary>
/// Base implementation class for buffered <see cref="IndexInput"/>. </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class BufferedIndexInput : IndexInput
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/BufferedIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/BufferedIndexOutput.cs b/src/Lucene.Net/Store/BufferedIndexOutput.cs
index 16fa6c8..5e0bd49 100644
--- a/src/Lucene.Net/Store/BufferedIndexOutput.cs
+++ b/src/Lucene.Net/Store/BufferedIndexOutput.cs
@@ -22,9 +22,6 @@ namespace Lucene.Net.Store
/// <summary>
/// Base implementation class for buffered <see cref="IndexOutput"/>. </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class BufferedIndexOutput : IndexOutput
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/ByteArrayDataInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/ByteArrayDataInput.cs b/src/Lucene.Net/Store/ByteArrayDataInput.cs
index 0f696c0..74aecdf 100644
--- a/src/Lucene.Net/Store/ByteArrayDataInput.cs
+++ b/src/Lucene.Net/Store/ByteArrayDataInput.cs
@@ -27,9 +27,6 @@ namespace Lucene.Net.Store
/// <para/>
/// @lucene.experimental
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class ByteArrayDataInput : DataInput
{
private byte[] bytes;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/ByteArrayDataOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/ByteArrayDataOutput.cs b/src/Lucene.Net/Store/ByteArrayDataOutput.cs
index 85f2e30..0a5101f 100644
--- a/src/Lucene.Net/Store/ByteArrayDataOutput.cs
+++ b/src/Lucene.Net/Store/ByteArrayDataOutput.cs
@@ -29,9 +29,6 @@ namespace Lucene.Net.Store
/// <para/>
/// @lucene.experimental
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class ByteArrayDataOutput : DataOutput
{
private byte[] bytes;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/ByteBufferIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/ByteBufferIndexInput.cs b/src/Lucene.Net/Store/ByteBufferIndexInput.cs
index 9827473..4b53a8f 100644
--- a/src/Lucene.Net/Store/ByteBufferIndexInput.cs
+++ b/src/Lucene.Net/Store/ByteBufferIndexInput.cs
@@ -35,9 +35,6 @@ namespace Lucene.Net.Store
/// For efficiency, this class requires that the buffers
/// are a power-of-two (<c>chunkSizePower</c>).
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class ByteBufferIndexInput : IndexInput
{
private ByteBuffer[] buffers;
@@ -55,9 +52,6 @@ namespace Lucene.Net.Store
private bool isClone = false;
private readonly WeakIdentityMap<ByteBufferIndexInput, BoolRefWrapper> clones;
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class BoolRefWrapper
{
// .NET port: this is needed as bool is not a reference type
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/CheckSumIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/CheckSumIndexInput.cs b/src/Lucene.Net/Store/CheckSumIndexInput.cs
index 445abc7..16dcc2f 100644
--- a/src/Lucene.Net/Store/CheckSumIndexInput.cs
+++ b/src/Lucene.Net/Store/CheckSumIndexInput.cs
@@ -23,9 +23,6 @@ namespace Lucene.Net.Store
/// Extension of <see cref="IndexInput"/>, computing checksum as it goes.
/// Callers can retrieve the checksum via <see cref="Checksum"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class ChecksumIndexInput : IndexInput
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/CompoundFileWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/CompoundFileWriter.cs b/src/Lucene.Net/Store/CompoundFileWriter.cs
index 245f4d3..cc2faee 100644
--- a/src/Lucene.Net/Store/CompoundFileWriter.cs
+++ b/src/Lucene.Net/Store/CompoundFileWriter.cs
@@ -35,14 +35,8 @@ namespace Lucene.Net.Store
/// @lucene.internal
/// </summary>
/// <seealso cref="CompoundFileDirectory"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
internal sealed class CompoundFileWriter : IDisposable
{
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private sealed class FileEntry
{
/// <summary>
@@ -357,9 +351,6 @@ namespace Lucene.Net.Store
return entries.Keys.ToArray();
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private sealed class DirectCFSIndexOutput : IndexOutput
{
private readonly CompoundFileWriter outerInstance;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/DataInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/DataInput.cs b/src/Lucene.Net/Store/DataInput.cs
index f1700b0..7b1be2a 100644
--- a/src/Lucene.Net/Store/DataInput.cs
+++ b/src/Lucene.Net/Store/DataInput.cs
@@ -34,9 +34,6 @@ namespace Lucene.Net.Store
/// returning a new <see cref="DataInput"/> which operates on the same underlying
/// resource, but positioned independently.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class DataInput
{
private const int SKIP_BUFFER_SIZE = 1024;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/DataOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/DataOutput.cs b/src/Lucene.Net/Store/DataOutput.cs
index 940439f..2848a28 100644
--- a/src/Lucene.Net/Store/DataOutput.cs
+++ b/src/Lucene.Net/Store/DataOutput.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -31,9 +30,6 @@ namespace Lucene.Net.Store
/// <para/><see cref="DataOutput"/> may only be used from one thread, because it is not
/// thread safe (it keeps internal state like file position).
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class DataOutput
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/Directory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/Directory.cs b/src/Lucene.Net/Store/Directory.cs
index 24b7bb8..27590b7 100644
--- a/src/Lucene.Net/Store/Directory.cs
+++ b/src/Lucene.Net/Store/Directory.cs
@@ -40,9 +40,6 @@ namespace Lucene.Net.Store
/// <see cref="Store.LockFactory"/>, and can be changed for each <see cref="Directory"/>
/// instance using <see cref="SetLockFactory"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class Directory : IDisposable // LUCENENET TODO: Subclass System.IO.FileSystemInfo ?
{
/// <summary>
@@ -252,9 +249,6 @@ namespace Lucene.Net.Store
return new IndexInputSlicerAnonymousInnerClassHelper(this, name, context);
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class IndexInputSlicerAnonymousInnerClassHelper : IndexInputSlicer
{
private readonly Directory outerInstance;
@@ -305,9 +299,6 @@ namespace Lucene.Net.Store
/// @lucene.internal
/// @lucene.experimental
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class IndexInputSlicer : IDisposable
{
/// <summary>
@@ -334,9 +325,6 @@ namespace Lucene.Net.Store
/// Implementation of an <see cref="IndexInput"/> that reads from a portion of
/// a file.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private sealed class SlicedIndexInput : BufferedIndexInput
{
private IndexInput @base;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/FilterDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/FilterDirectory.cs b/src/Lucene.Net/Store/FilterDirectory.cs
index fd07bda..0574d4a 100644
--- a/src/Lucene.Net/Store/FilterDirectory.cs
+++ b/src/Lucene.Net/Store/FilterDirectory.cs
@@ -32,9 +32,6 @@ namespace Lucene.Net.Store
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class FilterDirectory : Directory
{
protected readonly Directory m_input;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/FlushInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/FlushInfo.cs b/src/Lucene.Net/Store/FlushInfo.cs
index 34c14e4..d4a7f66 100644
--- a/src/Lucene.Net/Store/FlushInfo.cs
+++ b/src/Lucene.Net/Store/FlushInfo.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Store
{
/*
@@ -23,9 +21,6 @@ namespace Lucene.Net.Store
/// <para>A FlushInfo provides information required for a FLUSH context.
/// It is used as part of an <see cref="IOContext"/> in case of FLUSH context.</para>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class FlushInfo
{
public int NumDocs { get; private set; }
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/IOContext.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/IOContext.cs b/src/Lucene.Net/Store/IOContext.cs
index 953607f..9732248 100644
--- a/src/Lucene.Net/Store/IOContext.cs
+++ b/src/Lucene.Net/Store/IOContext.cs
@@ -1,5 +1,4 @@
using Lucene.Net.Support;
-using System;
using System.Diagnostics;
namespace Lucene.Net.Store
@@ -28,9 +27,6 @@ namespace Lucene.Net.Store
/// <see cref="Directory.CreateOutput(string, IOContext)"/>
/// </summary>
[ExceptionToClassNameConvention]
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class IOContext
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/IndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/IndexInput.cs b/src/Lucene.Net/Store/IndexInput.cs
index fae97a5..ac7b43f 100644
--- a/src/Lucene.Net/Store/IndexInput.cs
+++ b/src/Lucene.Net/Store/IndexInput.cs
@@ -34,9 +34,6 @@ namespace Lucene.Net.Store
/// <see cref="ObjectDisposedException"/> when the original one is closed.
/// </summary>
/// <seealso cref="Directory"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class IndexInput : DataInput, IDisposable
{
private readonly string resourceDescription;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/IndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/IndexOutput.cs b/src/Lucene.Net/Store/IndexOutput.cs
index 3c2adb2..0e0bc7b 100644
--- a/src/Lucene.Net/Store/IndexOutput.cs
+++ b/src/Lucene.Net/Store/IndexOutput.cs
@@ -28,9 +28,6 @@ namespace Lucene.Net.Store
/// </summary>
/// <seealso cref="Directory"/>
/// <seealso cref="IndexInput"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class IndexOutput : DataOutput, IDisposable
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/InputStreamDataInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/InputStreamDataInput.cs b/src/Lucene.Net/Store/InputStreamDataInput.cs
index a5ab53b..fab212a 100644
--- a/src/Lucene.Net/Store/InputStreamDataInput.cs
+++ b/src/Lucene.Net/Store/InputStreamDataInput.cs
@@ -23,9 +23,6 @@ namespace Lucene.Net.Store
/// <summary>
/// A <see cref="DataInput"/> wrapping a plain <see cref="Stream"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class InputStreamDataInput : DataInput, IDisposable
{
private BinaryReader _reader;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/LockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/LockFactory.cs b/src/Lucene.Net/Store/LockFactory.cs
index 328560a..5da1e6d 100644
--- a/src/Lucene.Net/Store/LockFactory.cs
+++ b/src/Lucene.Net/Store/LockFactory.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Store
{
/*
@@ -42,9 +40,6 @@ namespace Lucene.Net.Store
/// <seealso cref="LockVerifyServer"/>
/// <seealso cref="LockStressTest"/>
/// <seealso cref="VerifyingLockFactory"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class LockFactory
{
protected string m_lockPrefix = null;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/MergeInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/MergeInfo.cs b/src/Lucene.Net/Store/MergeInfo.cs
index c539583..696ba64 100644
--- a/src/Lucene.Net/Store/MergeInfo.cs
+++ b/src/Lucene.Net/Store/MergeInfo.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Store
{
/*
@@ -23,9 +21,6 @@ namespace Lucene.Net.Store
/// <para>A MergeInfo provides information required for a MERGE context.
/// It is used as part of an <see cref="IOContext"/> in case of MERGE context.</para>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class MergeInfo
{
public int TotalDocCount { get; private set; }
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/NIOFSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/NIOFSDirectory.cs b/src/Lucene.Net/Store/NIOFSDirectory.cs
index 74adff4..54bd5b2 100644
--- a/src/Lucene.Net/Store/NIOFSDirectory.cs
+++ b/src/Lucene.Net/Store/NIOFSDirectory.cs
@@ -48,9 +48,6 @@ namespace Lucene.Net.Store
/// favor of <see cref="NIOFSDirectory"/>.</font>
/// </para>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class NIOFSDirectory : FSDirectory
{
/// <summary>
@@ -119,9 +116,6 @@ namespace Lucene.Net.Store
return new IndexInputSlicerAnonymousInnerClassHelper(context, path, fc);
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
private class IndexInputSlicerAnonymousInnerClassHelper : IndexInputSlicer
{
private readonly IOContext context;
@@ -167,9 +161,6 @@ namespace Lucene.Net.Store
/// Reads bytes with the <see cref="FileStreamExtensions.Read(FileStream, ByteBuffer, long)"/>
/// extension method for <see cref="FileStream"/>.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
protected class NIOFSIndexInput : BufferedIndexInput
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/NoLockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/NoLockFactory.cs b/src/Lucene.Net/Store/NoLockFactory.cs
index 5159ddd..eeda73f 100644
--- a/src/Lucene.Net/Store/NoLockFactory.cs
+++ b/src/Lucene.Net/Store/NoLockFactory.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Store
{
/*
@@ -25,9 +23,6 @@ namespace Lucene.Net.Store
/// <see cref="GetNoLockFactory()"/> to get the instance.
/// </summary>
/// <seealso cref="LockFactory"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class NoLockFactory : LockFactory
{
// Single instance returned whenever makeLock is called.
@@ -53,9 +48,6 @@ namespace Lucene.Net.Store
}
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
internal class NoLock : Lock
{
public override bool Obtain()
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/RAMDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/RAMDirectory.cs b/src/Lucene.Net/Store/RAMDirectory.cs
index ae8651c..6f67f68 100644
--- a/src/Lucene.Net/Store/RAMDirectory.cs
+++ b/src/Lucene.Net/Store/RAMDirectory.cs
@@ -42,9 +42,6 @@ namespace Lucene.Net.Store
/// implementation working directly on the file system cache of the
/// operating system, so copying data to heap space is not useful.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class RAMDirectory : BaseDirectory
{
protected internal readonly ConcurrentDictionary<string, RAMFile> m_fileMap = new ConcurrentDictionary<string, RAMFile>();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/RAMFile.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/RAMFile.cs b/src/Lucene.Net/Store/RAMFile.cs
index 536a410..1da3b5e 100644
--- a/src/Lucene.Net/Store/RAMFile.cs
+++ b/src/Lucene.Net/Store/RAMFile.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
namespace Lucene.Net.Store
@@ -25,9 +24,6 @@ namespace Lucene.Net.Store
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class RAMFile
{
protected List<byte[]> m_buffers = new List<byte[]>();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/RAMInputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/RAMInputStream.cs b/src/Lucene.Net/Store/RAMInputStream.cs
index 623bd72..525d1a8 100644
--- a/src/Lucene.Net/Store/RAMInputStream.cs
+++ b/src/Lucene.Net/Store/RAMInputStream.cs
@@ -1,4 +1,3 @@
-using System;
using System.IO;
namespace Lucene.Net.Store
@@ -25,9 +24,6 @@ namespace Lucene.Net.Store
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class RAMInputStream : IndexInput
{
internal const int BUFFER_SIZE = RAMOutputStream.BUFFER_SIZE;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/RAMOutputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/RAMOutputStream.cs b/src/Lucene.Net/Store/RAMOutputStream.cs
index 4545392..db0baba 100644
--- a/src/Lucene.Net/Store/RAMOutputStream.cs
+++ b/src/Lucene.Net/Store/RAMOutputStream.cs
@@ -26,9 +26,6 @@ namespace Lucene.Net.Store
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class RAMOutputStream : IndexOutput
{
internal const int BUFFER_SIZE = 1024;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs b/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs
index 2cced29..2bc0bbc 100644
--- a/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs
+++ b/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
@@ -30,9 +29,6 @@ namespace Lucene.Net.Store
/// @lucene.experimental
/// </summary>
/// <seealso cref="SetRateLimiter(RateLimiter, IOContext.UsageContext)"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class RateLimitedDirectoryWrapper : FilterDirectory
{
// we need to be volatile here to make sure we see all the values that are set
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Store/SingleInstanceLockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/SingleInstanceLockFactory.cs b/src/Lucene.Net/Store/SingleInstanceLockFactory.cs
index a5ee42f..5745355 100644
--- a/src/Lucene.Net/Store/SingleInstanceLockFactory.cs
+++ b/src/Lucene.Net/Store/SingleInstanceLockFactory.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
namespace Lucene.Net.Store
@@ -29,9 +28,6 @@ namespace Lucene.Net.Store
/// currently the default locking for <see cref="RAMDirectory"/>.
/// </summary>
/// <seealso cref="LockFactory"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class SingleInstanceLockFactory : LockFactory
{
private HashSet<string> locks = new HashSet<string>();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/AtomicBoolean.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/AtomicBoolean.cs b/src/Lucene.Net/Support/AtomicBoolean.cs
index f5f1cbf..163ca4c 100644
--- a/src/Lucene.Net/Support/AtomicBoolean.cs
+++ b/src/Lucene.Net/Support/AtomicBoolean.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Threading;
+using System.Threading;
namespace Lucene.Net.Support
{
@@ -20,9 +19,6 @@ namespace Lucene.Net.Support
* limitations under the License.
*/
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class AtomicBoolean
{
private int value = 0;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/AtomicInteger.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/AtomicInteger.cs b/src/Lucene.Net/Support/AtomicInteger.cs
index b3b2cca..90531cb 100644
--- a/src/Lucene.Net/Support/AtomicInteger.cs
+++ b/src/Lucene.Net/Support/AtomicInteger.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Threading;
+using System.Threading;
namespace Lucene.Net.Support
{
@@ -23,9 +22,6 @@ namespace Lucene.Net.Support
/// <summary>
/// NOTE: This was AtomicInteger in the JDK
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class AtomicInt32
{
private int value;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/AtomicLong.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/AtomicLong.cs b/src/Lucene.Net/Support/AtomicLong.cs
index b74edda..376092f 100644
--- a/src/Lucene.Net/Support/AtomicLong.cs
+++ b/src/Lucene.Net/Support/AtomicLong.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Threading;
+using System.Threading;
namespace Lucene.Net.Support
{
@@ -23,9 +22,6 @@ namespace Lucene.Net.Support
/// <summary>
/// NOTE: This was AtomicLong in the JDK
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class AtomicInt64
{
private long value;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/IO/Buffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/IO/Buffer.cs b/src/Lucene.Net/Support/IO/Buffer.cs
index 79bd73e..c1683cb 100644
--- a/src/Lucene.Net/Support/IO/Buffer.cs
+++ b/src/Lucene.Net/Support/IO/Buffer.cs
@@ -66,9 +66,6 @@ namespace Lucene.Net.Support.IO
/// required, then the callers are responsible to take care of the
/// synchronization issues.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class Buffer
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/IO/ByteBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/IO/ByteBuffer.cs b/src/Lucene.Net/Support/IO/ByteBuffer.cs
index f2056f2..e1c576d 100644
--- a/src/Lucene.Net/Support/IO/ByteBuffer.cs
+++ b/src/Lucene.Net/Support/IO/ByteBuffer.cs
@@ -37,9 +37,6 @@ namespace Lucene.Net.Support.IO
/// <item><description><see cref="Wrap(byte[])"/> an existing byte array to create a new buffer</description></item>
/// </list>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class ByteBuffer : Buffer, IComparable<ByteBuffer>
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/IO/LongBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/IO/LongBuffer.cs b/src/Lucene.Net/Support/IO/LongBuffer.cs
index b278245..b77d2fe 100644
--- a/src/Lucene.Net/Support/IO/LongBuffer.cs
+++ b/src/Lucene.Net/Support/IO/LongBuffer.cs
@@ -36,9 +36,6 @@ namespace Lucene.Net.Support.IO
/// buffer</description></item>
/// </list>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class Int64Buffer : Buffer, IComparable<Int64Buffer>
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/IdentityComparer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/IdentityComparer.cs b/src/Lucene.Net/Support/IdentityComparer.cs
index 9d493cd..e66c6eb 100644
--- a/src/Lucene.Net/Support/IdentityComparer.cs
+++ b/src/Lucene.Net/Support/IdentityComparer.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections;
+using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
@@ -22,9 +21,6 @@ namespace Lucene.Net.Support
* limitations under the License.
*/
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class IdentityComparer<T> : IEqualityComparer<T>
{
public bool Equals(T x, T y)
@@ -38,9 +34,6 @@ namespace Lucene.Net.Support
}
}
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class IdentityComparer : IEqualityComparer
{
public new bool Equals(object x, object y)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/IdentityHashMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/IdentityHashMap.cs b/src/Lucene.Net/Support/IdentityHashMap.cs
index 9cb7a02..e7a381d 100644
--- a/src/Lucene.Net/Support/IdentityHashMap.cs
+++ b/src/Lucene.Net/Support/IdentityHashMap.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace Lucene.Net.Support
{
@@ -20,9 +19,6 @@ namespace Lucene.Net.Support
* limitations under the License.
*/
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class IdentityHashMap<TKey, TValue> : HashMap<TKey, TValue>
{
public IdentityHashMap()
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/IdentityHashSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/IdentityHashSet.cs b/src/Lucene.Net/Support/IdentityHashSet.cs
index e0c64f2..06709c0 100644
--- a/src/Lucene.Net/Support/IdentityHashSet.cs
+++ b/src/Lucene.Net/Support/IdentityHashSet.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace Lucene.Net.Support
{
@@ -20,9 +19,6 @@ namespace Lucene.Net.Support
* limitations under the License.
*/
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class IdentityHashSet<T> : HashSet<T>
{
public IdentityHashSet()
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/LinkedHashMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/LinkedHashMap.cs b/src/Lucene.Net/Support/LinkedHashMap.cs
index e3d9c94..211d6ef 100644
--- a/src/Lucene.Net/Support/LinkedHashMap.cs
+++ b/src/Lucene.Net/Support/LinkedHashMap.cs
@@ -58,9 +58,6 @@ namespace Lucene.Net.Support
/// <item><description><see cref="LurchTable{TKey, TValue}"/> - use when you need to sort by most recent access or most recent update. Works well for LRU caching.</description></item>
/// </list>
/// </remarks>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class LinkedHashMap<TKey, TValue> : HashMap<TKey, TValue>, IDictionary<TKey, TValue>
{
private readonly HashMap<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> dict;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Support/PriorityQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/PriorityQueue.cs b/src/Lucene.Net/Support/PriorityQueue.cs
index 86b97bc..1badc39 100644
--- a/src/Lucene.Net/Support/PriorityQueue.cs
+++ b/src/Lucene.Net/Support/PriorityQueue.cs
@@ -36,9 +36,6 @@ namespace Lucene.Net.Support
/// A <see cref="PriorityQueue{T}"/> is not synchronized.
/// </summary>
/// <typeparam name="T">Type of elements</typeparam>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class PriorityQueue<T> : ICollection<T> where T : class // LUCENENET: added constraint so we can return null like the original code
{
private static readonly int DEFAULT_CAPACITY = 11;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/AttributeImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/AttributeImpl.cs b/src/Lucene.Net/Util/AttributeImpl.cs
index 4259bfa..72fcdc2 100644
--- a/src/Lucene.Net/Util/AttributeImpl.cs
+++ b/src/Lucene.Net/Util/AttributeImpl.cs
@@ -29,9 +29,6 @@ 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>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class Attribute : IAttribute
#if FEATURE_CLONEABLE
, ICloneable
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/AttributeSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/AttributeSource.cs b/src/Lucene.Net/Util/AttributeSource.cs
index ec80c40..1df05e8 100644
--- a/src/Lucene.Net/Util/AttributeSource.cs
+++ b/src/Lucene.Net/Util/AttributeSource.cs
@@ -35,9 +35,6 @@ namespace Lucene.Net.Util
/// that type is already present. If yes, it returns the instance, otherwise
/// it creates a new instance and returns it.
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class AttributeSource
{
/// <summary>
@@ -104,9 +101,6 @@ namespace Lucene.Net.Util
/// This class holds the state of an <see cref="AttributeSource"/>. </summary>
/// <seealso cref="CaptureState()"/>
/// <seealso cref="RestoreState(State)"/>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class State
{
internal Attribute attribute;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/BytesRefArray.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/BytesRefArray.cs b/src/Lucene.Net/Util/BytesRefArray.cs
index c6f16ef..3da98eb 100644
--- a/src/Lucene.Net/Util/BytesRefArray.cs
+++ b/src/Lucene.Net/Util/BytesRefArray.cs
@@ -30,9 +30,6 @@ namespace Lucene.Net.Util
/// @lucene.internal
/// @lucene.experimental
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class BytesRefArray
{
private readonly ByteBlockPool pool;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/CharsRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/CharsRef.cs b/src/Lucene.Net/Util/CharsRef.cs
index 432d53f..36fef16 100644
--- a/src/Lucene.Net/Util/CharsRef.cs
+++ b/src/Lucene.Net/Util/CharsRef.cs
@@ -30,9 +30,6 @@ namespace Lucene.Net.Util
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class CharsRef : IComparable<CharsRef>, ICharSequence
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/DocIdBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/DocIdBitSet.cs b/src/Lucene.Net/Util/DocIdBitSet.cs
index 7531446..63856ef 100644
--- a/src/Lucene.Net/Util/DocIdBitSet.cs
+++ b/src/Lucene.Net/Util/DocIdBitSet.cs
@@ -1,5 +1,4 @@
using Lucene.Net.Support;
-using System;
using System.Collections;
namespace Lucene.Net.Util
@@ -27,9 +26,6 @@ namespace Lucene.Net.Util
/// <summary>
/// Simple <see cref="DocIdSet"/> and <see cref="DocIdSetIterator"/> backed by a <see cref="BitArray"/>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class DocIdBitSet : DocIdSet, IBits
{
private readonly BitArray bitSet;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/IntsRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/IntsRef.cs b/src/Lucene.Net/Util/IntsRef.cs
index 9a37b34..b0c67d9 100644
--- a/src/Lucene.Net/Util/IntsRef.cs
+++ b/src/Lucene.Net/Util/IntsRef.cs
@@ -32,9 +32,6 @@ namespace Lucene.Net.Util
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class Int32sRef : IComparable<Int32sRef>
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/LongBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/LongBitSet.cs b/src/Lucene.Net/Util/LongBitSet.cs
index f1d6644..96da788 100644
--- a/src/Lucene.Net/Util/LongBitSet.cs
+++ b/src/Lucene.Net/Util/LongBitSet.cs
@@ -30,9 +30,6 @@ namespace Lucene.Net.Util
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class Int64BitSet
{
private readonly long[] bits;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/LongsRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/LongsRef.cs b/src/Lucene.Net/Util/LongsRef.cs
index f5a0c4f..429f162 100644
--- a/src/Lucene.Net/Util/LongsRef.cs
+++ b/src/Lucene.Net/Util/LongsRef.cs
@@ -32,9 +32,6 @@ namespace Lucene.Net.Util
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public sealed class Int64sRef : IComparable<Int64sRef>
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/OpenBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/OpenBitSet.cs b/src/Lucene.Net/Util/OpenBitSet.cs
index e30a849..9c1bad3 100644
--- a/src/Lucene.Net/Util/OpenBitSet.cs
+++ b/src/Lucene.Net/Util/OpenBitSet.cs
@@ -77,9 +77,6 @@ namespace Lucene.Net.Util
/// </item>
/// </list>
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class OpenBitSet : DocIdSet, IBits
{
protected internal long[] m_bits;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/OpenBitSetDISI.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/OpenBitSetDISI.cs b/src/Lucene.Net/Util/OpenBitSetDISI.cs
index d7bb489..63991d1 100644
--- a/src/Lucene.Net/Util/OpenBitSetDISI.cs
+++ b/src/Lucene.Net/Util/OpenBitSetDISI.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Lucene.Net.Util
{
/*
@@ -25,9 +23,6 @@ namespace Lucene.Net.Util
/// <see cref="OpenBitSet"/> with added methods to bulk-update the bits
/// from a <see cref="DocIdSetIterator"/>. (DISI stands for <see cref="DocIdSetIterator"/>).
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public class OpenBitSetDISI : OpenBitSet
{
/// <summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Util/PriorityQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/PriorityQueue.cs b/src/Lucene.Net/Util/PriorityQueue.cs
index 36d5be5..6b5e4ed 100644
--- a/src/Lucene.Net/Util/PriorityQueue.cs
+++ b/src/Lucene.Net/Util/PriorityQueue.cs
@@ -35,9 +35,6 @@ namespace Lucene.Net.Util
/// <para/>
/// @lucene.internal
/// </summary>
-#if FEATURE_SERIALIZABLE
- [Serializable]
-#endif
public abstract class PriorityQueue<T>
{
private int size = 0;