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/01/29 13:27:54 UTC

[32/37] lucenenet git commit: Lucene.Net.Codecs refactor: Changed public fields to properties

Lucene.Net.Codecs refactor: Changed public fields to properties


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/5a5c215d
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/5a5c215d
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/5a5c215d

Branch: refs/heads/api-work
Commit: 5a5c215dc7a8ca3f59b71f965f7a4d922a930e8b
Parents: c0908b4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 17:50:33 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:50:33 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs        | 9 +++++++--
 .../Intblock/VariableIntBlockIndexInput.cs                  | 8 +++++++-
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5a5c215d/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index f3b6846..a6d9bda 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -167,8 +167,13 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class TermEntry
         {
-            public readonly BytesRef Term = new BytesRef();
-            public BlockTermState State;
+            public BytesRef Term { get; private set; }
+            public BlockTermState State { get; set; }
+
+            public TermEntry()
+            {
+                Term = new BytesRef();
+            }
         }
 
         internal class TermsWriter : TermsConsumer

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5a5c215d/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index f6a1557..6607801 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -1,5 +1,6 @@
 \ufeffusing Lucene.Net.Codecs.Sep;
 using Lucene.Net.Store;
+using Lucene.Net.Support;
 using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.IntBlock
@@ -83,7 +84,12 @@ namespace Lucene.Net.Codecs.IntBlock
         {
             private readonly IndexInput input;
 
-            public readonly int[] pending;
+            [WritableArray]
+            public int[] Pending
+            {
+                get { return pending; }
+            }
+            private readonly int[] pending;
             private int upto;
 
             private bool seekPending;