lucene-lucene-net-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject svn commit: r1299911 [8/14] - in /incubator/lucene.net/trunk: src/core/ src/core/Analysis/ src/core/Analysis/Standard/ src/core/Analysis/Tokenattributes/ src/core/Document/ src/core/Index/ src/core/Messages/ src/core/QueryParser/ src/core/Search/ src/c...
Date Mon, 12 Mar 2012 22:29:37 GMT
Modified: incubator/lucene.net/trunk/src/core/Search/TermRangeQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TermRangeQuery.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TermRangeQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TermRangeQuery.cs Mon Mar 12 22:29:26 2012
@@ -16,7 +16,7 @@
  */
 
 using System;
-
+using System.Globalization;
 using IndexReader = Lucene.Net.Index.IndexReader;
 using ToStringUtils = Lucene.Net.Util.ToStringUtils;
 
@@ -116,44 +116,44 @@ namespace Lucene.Net.Search
 			this.includeUpper = includeUpper;
 			this.collator = collator;
 		}
-		
-		/// <summary>Returns the field name for this query </summary>
-		public virtual System.String GetField()
-		{
-			return field;
-		}
-		
-		/// <summary>Returns the lower value of this range query </summary>
-		public virtual System.String GetLowerTerm()
-		{
-			return lowerTerm;
-		}
-		
-		/// <summary>Returns the upper value of this range query </summary>
-		public virtual System.String GetUpperTerm()
-		{
-			return upperTerm;
-		}
-		
-		/// <summary>Returns <c>true</c> if the lower endpoint is inclusive </summary>
-		public virtual bool IncludesLower()
-		{
-			return includeLower;
-		}
-		
-		/// <summary>Returns <c>true</c> if the upper endpoint is inclusive </summary>
-		public virtual bool IncludesUpper()
-		{
-			return includeUpper;
-		}
-		
-		/// <summary>Returns the collator used to determine range inclusion, if any. </summary>
-		public virtual System.Globalization.CompareInfo GetCollator()
-		{
-			return collator;
-		}
-		
-		public /*protected internal*/ override FilteredTermEnum GetEnum(IndexReader reader)
+
+	    /// <summary>Returns the field name for this query </summary>
+	    public virtual string Field
+	    {
+	        get { return field; }
+	    }
+
+	    /// <summary>Returns the lower value of this range query </summary>
+	    public virtual string LowerTerm
+	    {
+	        get { return lowerTerm; }
+	    }
+
+	    /// <summary>Returns the upper value of this range query </summary>
+	    public virtual string UpperTerm
+	    {
+	        get { return upperTerm; }
+	    }
+
+	    /// <summary>Returns <c>true</c> if the lower endpoint is inclusive </summary>
+	    public virtual bool IncludesLower
+	    {
+	        get { return includeLower; }
+	    }
+
+	    /// <summary>Returns <c>true</c> if the upper endpoint is inclusive </summary>
+	    public virtual bool IncludesUpper
+	    {
+	        get { return includeUpper; }
+	    }
+
+	    /// <summary>Returns the collator used to determine range inclusion, if any. </summary>
+	    public virtual CompareInfo Collator
+	    {
+	        get { return collator; }
+	    }
+
+	    protected internal override FilteredTermEnum GetEnum(IndexReader reader)
 		{
 			return new TermRangeTermEnum(reader, field, lowerTerm, upperTerm, includeLower, includeUpper, collator);
 		}
@@ -162,9 +162,9 @@ namespace Lucene.Net.Search
 		public override System.String ToString(System.String field)
 		{
 			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
-			if (!GetField().Equals(field))
+			if (!Field.Equals(field))
 			{
-				buffer.Append(GetField());
+				buffer.Append(Field);
 				buffer.Append(":");
 			}
 			buffer.Append(includeLower?'[':'{');
@@ -172,7 +172,7 @@ namespace Lucene.Net.Search
 			buffer.Append(" TO ");
 			buffer.Append(upperTerm != null?upperTerm:"*");
 			buffer.Append(includeUpper?']':'}');
-			buffer.Append(ToStringUtils.Boost(GetBoost()));
+			buffer.Append(ToStringUtils.Boost(Boost));
 			return buffer.ToString();
 		}
 		

Modified: incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs Mon Mar 12 22:29:26 2012
@@ -105,17 +105,14 @@ namespace Lucene.Net.Search
 		{
 			return endEnum;
 		}
-		
-		public /*protected internal*/ override bool TermCompare(Term term)
+
+	    protected internal override bool TermCompare(Term term)
 		{
 			if (collator == null)
 			{
 				// Use Unicode code point ordering
-				bool checkLower = false;
-				if (!includeLower)
-				// make adjustments to set to exclusive
-					checkLower = true;
-				if (term != null && (System.Object) term.Field() == (System.Object) field)
+			    bool checkLower = !includeLower;
+			    if (term != null && (System.Object) term.Field() == (System.Object) field)
 				{
 					// interned comparison
 					if (!checkLower || null == lowerTermText || String.CompareOrdinal(term.Text(), lowerTermText) > 0)

Modified: incubator/lucene.net/trunk/src/core/Search/TermScorer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TermScorer.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TermScorer.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TermScorer.cs Mon Mar 12 22:29:26 2012
@@ -59,10 +59,10 @@ namespace Lucene.Net.Search
 			this.weight = weight;
 			this.termDocs = td;
 			this.norms = norms;
-			this.weightValue = weight.GetValue();
+			this.weightValue = weight.Value;
 			
 			for (int i = 0; i < SCORE_CACHE_SIZE; i++)
-				scoreCache[i] = GetSimilarity().Tf(i) * weightValue;
+				scoreCache[i] = Similarity.Tf(i) * weightValue;
 		}
 		
 		public override void  Score(Collector c)
@@ -134,7 +134,7 @@ namespace Lucene.Net.Search
 		{
 			System.Diagnostics.Debug.Assert(doc != - 1);
 			int f = freqs[pointer];
-			float raw = f < SCORE_CACHE_SIZE?scoreCache[f]:GetSimilarity().Tf(f) * weightValue; // cache miss
+			float raw = f < SCORE_CACHE_SIZE?scoreCache[f]:Similarity.Tf(f) * weightValue; // cache miss
 			
 			return norms == null?raw:raw * SIM_NORM_DECODER[norms[doc] & 0xFF]; // normalize for field
 		}

Modified: incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs Mon Mar 12 22:29:26 2012
@@ -110,21 +110,24 @@ namespace Lucene.Net.Search
 				this.timeElapsed = timeElapsed;
 				this.lastDocCollected = lastDocCollected;
 			}
-			/// <summary>Returns allowed time (milliseconds). </summary>
-			public virtual long GetTimeAllowed()
-			{
-				return timeAllowed;
-			}
-			/// <summary>Returns elapsed time (milliseconds). </summary>
-			public virtual long GetTimeElapsed()
-			{
-				return timeElapsed;
-			}
-            /// <summary>Returns last doc(absolute doc id) that was collected when the search time exceeded. </summary>
-			public virtual int GetLastDocCollected()
-			{
-				return lastDocCollected;
-			}
+
+		    /// <summary>Returns allowed time (milliseconds). </summary>
+		    public virtual long TimeAllowed
+		    {
+		        get { return timeAllowed; }
+		    }
+
+		    /// <summary>Returns elapsed time (milliseconds). </summary>
+		    public virtual long TimeElapsed
+		    {
+		        get { return timeElapsed; }
+		    }
+
+		    /// <summary>Returns last doc(absolute doc id) that was collected when the search time exceeded. </summary>
+		    public virtual int LastDocCollected
+		    {
+		        get { return lastDocCollected; }
+		    }
 		}
 		
 		// Declare and initialize a single static timer thread to be used by
@@ -150,57 +153,44 @@ namespace Lucene.Net.Search
 			t0 = TIMER_THREAD.GetMilliseconds();
 			this.timeout = t0 + timeAllowed;
 		}
-		
-		/// <summary> Return the timer resolution.</summary>
-		/// <seealso cref="SetResolution(uint)">
-		/// </seealso>
-		public static long GetResolution()
-		{
-			return resolution;
-		}
-		
-		/// <summary> Set the timer resolution.
-		/// The default timer resolution is 20 milliseconds. 
-		/// This means that a search required to take no longer than 
-		/// 800 milliseconds may be stopped after 780 to 820 milliseconds.
-		/// <br/>Note that: 
-		/// <list type="bullet">
-		/// <item>Finer (smaller) resolution is more accurate but less efficient.</item>
-		/// <item>Setting resolution to less than 5 milliseconds will be silently modified to 5 milliseconds.</item>
-		/// <item>Setting resolution smaller than current resolution might take effect only after current 
-		/// resolution. (Assume current resolution of 20 milliseconds is modified to 5 milliseconds, 
-		/// then it can take up to 20 milliseconds for the change to have effect.</item>
-		/// </list>      
-		/// </summary>
-		public static void  SetResolution(uint newResolution)
-		{
-			resolution = System.Math.Max(newResolution, 5); // 5 milliseconds is about the minimum reasonable time for a Object.wait(long) call.
-		}
-		
-		/// <summary> Checks if this time limited collector is greedy in collecting the last hit.
-		/// A non greedy collector, upon a timeout, would throw a <see cref="TimeExceededException" /> 
-		/// without allowing the wrapped collector to collect current doc. A greedy one would 
-		/// first allow the wrapped hit collector to collect current doc and only then 
-		/// throw a <see cref="TimeExceededException" />.
-		/// </summary>
-		/// <seealso cref="SetGreedy(bool)">
-		/// </seealso>
-		public virtual bool IsGreedy()
-		{
-			return greedy;
-		}
-		
-		/// <summary> Sets whether this time limited collector is greedy.</summary>
-		/// <param name="greedy">true to make this time limited greedy
-		/// </param>
-		/// <seealso cref="IsGreedy()">
-		/// </seealso>
-		public virtual void  SetGreedy(bool greedy)
-		{
-			this.greedy = greedy;
-		}
-		
-		/// <summary> Calls <see cref="Collector.Collect(int)" /> on the decorated <see cref="Collector" />
+
+        /// <summary>
+        /// Gets or sets the timer resolution.
+        /// The default timer resolution is 20 milliseconds. 
+        /// This means that a search required to take no longer than 
+        /// 800 milliseconds may be stopped after 780 to 820 milliseconds.
+        /// <br/>Note that: 
+        /// <list type="bullet">
+        /// <item>Finer (smaller) resolution is more accurate but less efficient.</item>
+        /// <item>Setting resolution to less than 5 milliseconds will be silently modified to 5 milliseconds.</item>
+        /// <item>Setting resolution smaller than current resolution might take effect only after current 
+        /// resolution. (Assume current resolution of 20 milliseconds is modified to 5 milliseconds, 
+        /// then it can take up to 20 milliseconds for the change to have effect.</item>
+        /// </list> 
+        /// </summary>
+	    public static long Resolution
+	    {
+	        get { return resolution; }
+            set
+            {
+                // 5 milliseconds is about the minimum reasonable time for a Object.wait(long) call.
+                resolution = (uint)System.Math.Max(value, 5);
+            }
+	    }
+
+	    /// <summary> Checks if this time limited collector is greedy in collecting the last hit.
+	    /// A non greedy collector, upon a timeout, would throw a <see cref="TimeExceededException" /> 
+	    /// without allowing the wrapped collector to collect current doc. A greedy one would 
+	    /// first allow the wrapped hit collector to collect current doc and only then 
+	    /// throw a <see cref="TimeExceededException" />.
+	    /// </summary>
+	    public virtual bool IsGreedy
+	    {
+	        get { return greedy; }
+	        set { this.greedy = value; }
+	    }
+
+	    /// <summary> Calls <see cref="Collector.Collect(int)" /> on the decorated <see cref="Collector" />
 		/// unless the allowed time has passed, in which case it throws an exception.
 		/// 
 		/// </summary>

Modified: incubator/lucene.net/trunk/src/core/Search/TopDocs.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TopDocs.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TopDocs.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TopDocs.cs Mon Mar 12 22:29:26 2012
@@ -46,27 +46,15 @@ namespace Lucene.Net.Search
             set { _scoreDocs = value; }
         }
 
-        /// <summary>Stores the maximum score value encountered, needed for normalizing. </summary>
+        /// <summary>
+        /// Gets or sets the maximum score value encountered, needed for normalizing.
+        /// Note that in case scores are not tracked, this returns <see cref="float.NaN" />.
+        /// </summary>
         public float MaxScore
         {
             get { return _maxScore; }
             set { _maxScore = value; }
         }
-
-
-		/// <summary>Returns the maximum score value encountered. Note that in case
-		/// scores are not tracked, this returns <see cref="float.NaN" />.
-		/// </summary>
-		public virtual float GetMaxScore()
-		{
-			return MaxScore;
-		}
-		
-		/// <summary>Sets the maximum score value encountered. </summary>
-		public virtual void  SetMaxScore(float maxScore)
-		{
-			this.MaxScore = maxScore;
-		}
 		
 		/// <summary>Constructs a TopDocs with a default maxScore=Float.NaN. </summary>
 		internal TopDocs(int totalHits, ScoreDoc[] scoreDocs):this(totalHits, scoreDocs, System.Single.NaN)

Modified: incubator/lucene.net/trunk/src/core/Search/TopDocsCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TopDocsCollector.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TopDocsCollector.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TopDocsCollector.cs Mon Mar 12 22:29:26 2012
@@ -69,14 +69,14 @@ namespace Lucene.Net.Search
 		{
 			return results == null?EMPTY_TOPDOCS:new TopDocs(totalHits, results);
 		}
-		
-		/// <summary>The total number of documents that matched this query. </summary>
-		public virtual int GetTotalHits()
-		{
-			return totalHits;
-		}
-		
-		/// <summary>Returns the top docs that were collected by this collector. </summary>
+
+	    /// <summary>The total number of documents that matched this query. </summary>
+	    public virtual int TotalHits
+	    {
+	        get { return totalHits; }
+	    }
+
+	    /// <summary>Returns the top docs that were collected by this collector. </summary>
 		public TopDocs TopDocs()
 		{
 			// In case pq was populated with sentinel values, there might be less

Modified: incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs Mon Mar 12 22:29:26 2012
@@ -57,7 +57,7 @@ namespace Lucene.Net.Search
 			internal void UpdateBottom(int doc)
 			{
 				// bottom.score is already set to Float.NaN in add().
-				bottom.doc = docBase + doc;
+				bottom.Doc = docBase + doc;
 				bottom = pq.UpdateTop();
 			}
 			
@@ -124,7 +124,7 @@ namespace Lucene.Net.Search
 				{
 					// Fastmatch: return if this hit is not competitive
 					int cmp = reverseMul * comparator.CompareBottom(doc);
-					if (cmp < 0 || (cmp == 0 && doc + docBase > bottom.doc))
+					if (cmp < 0 || (cmp == 0 && doc + docBase > bottom.Doc))
 					{
 						return ;
 					}
@@ -169,8 +169,8 @@ namespace Lucene.Net.Search
 			
 			internal void UpdateBottom(int doc, float score)
 			{
-				bottom.doc = docBase + doc;
-				bottom.score = score;
+				bottom.Doc = docBase + doc;
+				bottom.Score = score;
 				bottom = pq.UpdateTop();
 			}
 			
@@ -238,7 +238,7 @@ namespace Lucene.Net.Search
 				{
 					// Fastmatch: return if this hit is not competitive
 					int cmp = reverseMul * comparator.CompareBottom(doc);
-					if (cmp < 0 || (cmp == 0 && doc + docBase > bottom.doc))
+					if (cmp < 0 || (cmp == 0 && doc + docBase > bottom.Doc))
 					{
 						return ;
 					}
@@ -291,8 +291,8 @@ namespace Lucene.Net.Search
 			
 			internal void  UpdateBottom(int doc, float score)
 			{
-				bottom.doc = docBase + doc;
-				bottom.score = score;
+				bottom.Doc = docBase + doc;
+				bottom.Score = score;
 				bottom = pq.UpdateTop();
 			}
 			
@@ -364,7 +364,7 @@ namespace Lucene.Net.Search
 				{
 					// Fastmatch: return if this hit is not competitive
 					int cmp = reverseMul * comparator.CompareBottom(doc);
-					if (cmp < 0 || (cmp == 0 && doc + docBase > bottom.doc))
+					if (cmp < 0 || (cmp == 0 && doc + docBase > bottom.Doc))
 					{
 						return ;
 					}
@@ -412,7 +412,7 @@ namespace Lucene.Net.Search
 			internal void  UpdateBottom(int doc)
 			{
 				// bottom.score is already set to Float.NaN in add().
-				bottom.doc = docBase + doc;
+				bottom.Doc = docBase + doc;
 				bottom = pq.UpdateTop();
 			}
 			
@@ -530,7 +530,7 @@ namespace Lucene.Net.Search
 						else if (i == comparators.Length - 1)
 						{
 							// This is the equals case.
-							if (doc + docBase > bottom.doc)
+							if (doc + docBase > bottom.Doc)
 							{
 								// Definitely not competitive
 								return ;
@@ -595,8 +595,8 @@ namespace Lucene.Net.Search
 			
 			internal void  UpdateBottom(int doc, float score)
 			{
-				bottom.doc = docBase + doc;
-				bottom.score = score;
+				bottom.Doc = docBase + doc;
+				bottom.Score = score;
 				bottom = pq.UpdateTop();
 			}
 			
@@ -712,7 +712,7 @@ namespace Lucene.Net.Search
 						else if (i == comparators.Length - 1)
 						{
 							// This is the equals case.
-							if (doc + docBase > bottom.doc)
+							if (doc + docBase > bottom.Doc)
 							{
 								// Definitely not competitive
 								return ;
@@ -775,8 +775,8 @@ namespace Lucene.Net.Search
 			
 			internal void  UpdateBottom(int doc, float score)
 			{
-				bottom.doc = docBase + doc;
-				bottom.score = score;
+				bottom.Doc = docBase + doc;
+				bottom.Score = score;
 				bottom = pq.UpdateTop();
 			}
 			
@@ -887,7 +887,7 @@ namespace Lucene.Net.Search
 						else if (i == comparators.Length - 1)
 						{
 							// This is the equals case.
-							if (doc + docBase > bottom.doc)
+							if (doc + docBase > bottom.Doc)
 							{
 								// Definitely not competitive
 								return ;
@@ -1111,7 +1111,7 @@ namespace Lucene.Net.Search
 				for (int i = howMany - 1; i >= 0; i--)
 				{
 					Entry entry = pq.Pop();
-					results[i] = new FieldDoc(entry.doc, entry.score);
+					results[i] = new FieldDoc(entry.Doc, entry.Score);
 				}
 			}
 		}

Modified: incubator/lucene.net/trunk/src/core/Search/TopScoreDocCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TopScoreDocCollector.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TopScoreDocCollector.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TopScoreDocCollector.cs Mon Mar 12 22:29:26 2012
@@ -53,15 +53,15 @@ namespace Lucene.Net.Search
                 System.Diagnostics.Debug.Assert(!float.IsNaN(score));
 
 				totalHits++;
-				if (score <= pqTop.score)
+				if (score <= pqTop.Score)
 				{
 					// Since docs are returned in-order (i.e., increasing doc Id), a document
 					// with equal score to pqTop.score cannot compete since HitQueue favors
 					// documents with lower doc Ids. Therefore reject those docs too.
 					return ;
 				}
-				pqTop.doc = doc + docBase;
-				pqTop.score = score;
+				pqTop.Doc = doc + docBase;
+				pqTop.Score = score;
 				pqTop = pq.UpdateTop();
 			}
 			
@@ -87,12 +87,12 @@ namespace Lucene.Net.Search
 
 				totalHits++;
 				doc += docBase;
-				if (score < pqTop.score || (score == pqTop.score && doc > pqTop.doc))
+				if (score < pqTop.Score || (score == pqTop.Score && doc > pqTop.Doc))
 				{
 					return ;
 				}
-				pqTop.doc = doc;
-				pqTop.score = score;
+				pqTop.Doc = doc;
+				pqTop.Score = score;
 				pqTop = pq.UpdateTop();
 			}
 			
@@ -150,7 +150,7 @@ namespace Lucene.Net.Search
 			float maxScore = System.Single.NaN;
 			if (start == 0)
 			{
-				maxScore = results[0].score;
+				maxScore = results[0].Score;
 			}
 			else
 			{
@@ -158,7 +158,7 @@ namespace Lucene.Net.Search
 				{
 					pq.Pop();
 				}
-				maxScore = pq.Pop().score;
+				maxScore = pq.Pop().Score;
 			}
 			
 			return new TopDocs(totalHits, results, maxScore);

Modified: incubator/lucene.net/trunk/src/core/Search/Weight.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Weight.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Weight.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Weight.cs Mon Mar 12 22:29:26 2012
@@ -61,14 +61,14 @@ namespace Lucene.Net.Search
 		/// </returns>
 		/// <throws>  IOException </throws>
 		public abstract Explanation Explain(IndexReader reader, int doc);
-		
-		/// <summary>The query that this concerns. </summary>
-		public abstract Query GetQuery();
-		
-		/// <summary>The weight for this query. </summary>
-		public abstract float GetValue();
-		
-		/// <summary>Assigns the query normalization factor to this. </summary>
+
+	    /// <summary>The query that this concerns. </summary>
+	    public abstract Query Query { get; }
+
+	    /// <summary>The weight for this query. </summary>
+	    public abstract float Value { get; }
+
+	    /// <summary>Assigns the query normalization factor to this. </summary>
 		public abstract void  Normalize(float norm);
 		
 		/// <summary> Returns a <see cref="Scorer" /> which scores documents in/out-of order according
@@ -103,23 +103,23 @@ namespace Lucene.Net.Search
 		/// </returns>
 		/// <throws>  IOException </throws>
 		public abstract Scorer Scorer(IndexReader reader, bool scoreDocsInOrder, bool topScorer);
-		
-		/// <summary>The sum of squared weights of contained query clauses. </summary>
-		public abstract float SumOfSquaredWeights();
-		
-		/// <summary> Returns true iff this implementation scores docs only out of order. This
-		/// method is used in conjunction with <see cref="Collector" />'s 
-        /// <see cref="Collector.AcceptsDocsOutOfOrder()">AcceptsDocsOutOfOrder</see> and
-        /// <see cref="Scorer(Lucene.Net.Index.IndexReader, bool, bool)" /> to
-		/// create a matching <see cref="Scorer" /> instance for a given <see cref="Collector" />, or
-		/// vice versa.
-		/// <p/>
-		/// <b>NOTE:</b> the default implementation returns <c>false</c>, i.e.
-		/// the <c>Scorer</c> scores documents in-order.
-		/// </summary>
-		public virtual bool ScoresDocsOutOfOrder()
-		{
-			return false;
-		}
+
+	    /// <summary>The sum of squared weights of contained query clauses. </summary>
+	    public abstract float SumOfSquaredWeights { get; }
+
+	    /// <summary> Returns true iff this implementation scores docs only out of order. This
+	    /// method is used in conjunction with <see cref="Collector" />'s 
+	    /// <see cref="Collector.AcceptsDocsOutOfOrder()">AcceptsDocsOutOfOrder</see> and
+	    /// <see cref="Scorer(Lucene.Net.Index.IndexReader, bool, bool)" /> to
+	    /// create a matching <see cref="Scorer" /> instance for a given <see cref="Collector" />, or
+	    /// vice versa.
+	    /// <p/>
+	    /// <b>NOTE:</b> the default implementation returns <c>false</c>, i.e.
+	    /// the <c>Scorer</c> scores documents in-order.
+	    /// </summary>
+	    public virtual bool ScoresDocsOutOfOrder
+	    {
+	        get { return false; }
+	    }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Search/WildcardQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/WildcardQuery.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/WildcardQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/WildcardQuery.cs Mon Mar 12 22:29:26 2012
@@ -56,32 +56,32 @@ namespace Lucene.Net.Search
 		                        && (text.IndexOf('*') == text.Length - 1);
 		}
 		
-		public /*protected internal*/ override FilteredTermEnum GetEnum(IndexReader reader)
+		protected internal override FilteredTermEnum GetEnum(IndexReader reader)
 		{
             if (termContainsWildcard)
             {
-                return new WildcardTermEnum(reader, GetTerm());
+                return new WildcardTermEnum(reader, Term);
             }
             else
             {
-                return new SingleTermEnum(reader, GetTerm());
+                return new SingleTermEnum(reader, Term);
             }
 		}
-		
-		/// <summary> Returns the pattern term.</summary>
-		public Term GetTerm()
-		{
-			return term;
-		}
-		
-		public override Query Rewrite(IndexReader reader)
+
+	    /// <summary> Returns the pattern term.</summary>
+	    public Term Term
+	    {
+	        get { return term; }
+	    }
+
+	    public override Query Rewrite(IndexReader reader)
 		{
             if (termIsPrefix)
             {
                 MultiTermQuery rewritten =
                     new PrefixQuery(term.CreateTerm(term.text.Substring(0, term.text.IndexOf('*'))));
-                rewritten.SetBoost(GetBoost());
-                rewritten.SetRewriteMethod(GetRewriteMethod());
+                rewritten.Boost = Boost;
+                rewritten.QueryRewriteMethod = QueryRewriteMethod;
                 return rewritten;
             }
             else
@@ -100,7 +100,7 @@ namespace Lucene.Net.Search
 				buffer.Append(":");
 			}
 			buffer.Append(term.Text());
-			buffer.Append(ToStringUtils.Boost(GetBoost()));
+			buffer.Append(ToStringUtils.Boost(Boost));
 			return buffer.ToString();
 		}
 		

Modified: incubator/lucene.net/trunk/src/core/Search/WildcardTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/WildcardTermEnum.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/WildcardTermEnum.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/WildcardTermEnum.cs Mon Mar 12 22:29:26 2012
@@ -66,8 +66,8 @@ namespace Lucene.Net.Search
 			text = searchTermText.Substring(preLen);
 			SetEnum(reader.Terms(new Term(searchTerm.Field(), pre)));
 		}
-		
-		public /*protected internal*/ override bool TermCompare(Term term)
+
+	    /*protected internal*/ protected internal override bool TermCompare(Term term)
 		{
 			if ((System.Object) field == (System.Object) term.Field())
 			{

Modified: incubator/lucene.net/trunk/src/core/Store/BufferedIndexInput.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/BufferedIndexInput.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/BufferedIndexInput.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/BufferedIndexInput.cs Mon Mar 12 22:29:26 2012
@@ -207,13 +207,13 @@ namespace Lucene.Net.Store
 		/// <param name="length">the number of bytes to read
 		/// </param>
 		public abstract void  ReadInternal(byte[] b, int offset, int length);
-		
-		public override long GetFilePointer()
-		{
-			return bufferStart + bufferPosition;
-		}
-		
-		public override void  Seek(long pos)
+
+	    public override long FilePointer
+	    {
+	        get { return bufferStart + bufferPosition; }
+	    }
+
+	    public override void  Seek(long pos)
 		{
 			if (pos >= bufferStart && pos < (bufferStart + bufferLength))
 				bufferPosition = (int) (pos - bufferStart);
@@ -241,7 +241,7 @@ namespace Lucene.Net.Store
 			clone.buffer = null;
 			clone.bufferLength = 0;
 			clone.bufferPosition = 0;
-			clone.bufferStart = GetFilePointer();
+			clone.bufferStart = FilePointer;
 			
 			return clone;
 		}

Modified: incubator/lucene.net/trunk/src/core/Store/BufferedIndexOutput.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/BufferedIndexOutput.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/BufferedIndexOutput.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/BufferedIndexOutput.cs Mon Mar 12 22:29:26 2012
@@ -139,18 +139,18 @@ namespace Lucene.Net.Store
 
 		    isDisposed = true;
         }
-		
-		/// <summary>Returns the current position in this file, where the next write will
-		/// occur.
-		/// </summary>
-		/// <seealso cref="Seek(long)">
-		/// </seealso>
-		public override long GetFilePointer()
-		{
-			return bufferStart + bufferPosition;
-		}
-		
-		/// <summary>Sets current position in this file, where the next write will occur.</summary>
+
+	    /// <summary>Returns the current position in this file, where the next write will
+	    /// occur.
+	    /// </summary>
+	    /// <seealso cref="Seek(long)">
+	    /// </seealso>
+	    public override long FilePointer
+	    {
+	        get { return bufferStart + bufferPosition; }
+	    }
+
+	    /// <summary>Sets current position in this file, where the next write will occur.</summary>
 		/// <seealso cref="GetFilePointer()">
 		/// </seealso>
 		public override void  Seek(long pos)
@@ -158,8 +158,8 @@ namespace Lucene.Net.Store
 			Flush();
 			bufferStart = pos;
 		}
-		
-		/// <summary>The number of bytes in the file. </summary>
-		public abstract override long Length();
+
+	    /// <summary>The number of bytes in the file. </summary>
+	    public abstract override long Length { get; }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Store/CheckSumIndexInput.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/CheckSumIndexInput.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/CheckSumIndexInput.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/CheckSumIndexInput.cs Mon Mar 12 22:29:26 2012
@@ -76,13 +76,13 @@ namespace Lucene.Net.Store
             main = null;
             isDisposed = true;
         }
-		
-		public override long GetFilePointer()
-		{
-			return main.GetFilePointer();
-		}
-		
-		public override void  Seek(long pos)
+
+	    public override long FilePointer
+	    {
+	        get { return main.FilePointer; }
+	    }
+
+	    public override void  Seek(long pos)
 		{
 			throw new System.SystemException("not allowed");
 		}

Modified: incubator/lucene.net/trunk/src/core/Store/CheckSumIndexOutput.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/CheckSumIndexOutput.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/CheckSumIndexOutput.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/CheckSumIndexOutput.cs Mon Mar 12 22:29:26 2012
@@ -77,13 +77,13 @@ namespace Lucene.Net.Store
 
             isDisposed = true;
         }
-		
-		public override long GetFilePointer()
-		{
-			return main.GetFilePointer();
-		}
-		
-		public override void  Seek(long pos)
+
+	    public override long FilePointer
+	    {
+	        get { return main.FilePointer; }
+	    }
+
+	    public override void  Seek(long pos)
 		{
 			throw new System.SystemException("not allowed");
 		}
@@ -101,7 +101,7 @@ namespace Lucene.Net.Store
 			// are able to write a long to the file, but 2) not
 			// actually "commit" the file yet.  This (prepare
 			// commit) is phase 1 of a two-phase commit.
-			long pos = main.GetFilePointer();
+			long pos = main.FilePointer;
 			main.WriteLong(checksum - 1);
 			main.Flush();
 			main.Seek(pos);
@@ -112,10 +112,10 @@ namespace Lucene.Net.Store
 		{
 			main.WriteLong(Checksum);
 		}
-		
-		public override long Length()
-		{
-			return main.Length();
-		}
+
+	    public override long Length
+	    {
+	        get { return main.Length; }
+	    }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Store/Directory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/Directory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/Directory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/Directory.cs Mon Mar 12 22:29:26 2012
@@ -146,19 +146,19 @@ namespace Lucene.Net.Store
 		{
 		    System.Diagnostics.Debug.Assert(lockFactory != null);
 			this.lockFactory = lockFactory;
-			lockFactory.SetLockPrefix(this.LockId);
-		}
-		
-		/// <summary> Get the LockFactory that this Directory instance is
-		/// using for its locking implementation.  Note that this
-		/// may be null for Directory implementations that provide
-		/// their own locking implementation.
-		/// </summary>
-		public virtual LockFactory GetLockFactory()
-		{
-			return this.lockFactory;
+			lockFactory.LockPrefix = this.LockId;
 		}
 
+	    /// <summary> Get the LockFactory that this Directory instance is
+	    /// using for its locking implementation.  Note that this
+	    /// may be null for Directory implementations that provide
+	    /// their own locking implementation.
+	    /// </summary>
+	    public virtual LockFactory LockFactory
+	    {
+	        get { return this.lockFactory; }
+	    }
+
 	    /// <summary> Return a string identifier that uniquely differentiates
 	    /// this Directory instance from other Directory instances.
 	    /// This ID should be the same if two Directory instances
@@ -186,7 +186,7 @@ namespace Lucene.Net.Store
 
 	    public override string ToString()
         {
-            return base.ToString() + " lockFactory=" + GetLockFactory();
+            return base.ToString() + " lockFactory=" + LockFactory;
         }
 		
 		/// <summary> Copy contents of a directory src to a directory dest.
@@ -214,7 +214,7 @@ namespace Lucene.Net.Store
 		{
 			System.String[] files = src.ListAll();
 			
-			IndexFileNameFilter filter = IndexFileNameFilter.GetFilter();
+			IndexFileNameFilter filter = IndexFileNameFilter.Filter;
 			
 			byte[] buf = new byte[BufferedIndexOutput.BUFFER_SIZE];
 			for (int i = 0; i < files.Length; i++)

Modified: incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs Mon Mar 12 22:29:26 2012
@@ -19,6 +19,7 @@ using System;
 using System.Collections.Generic;
 
 // Used only for WRITE_LOCK_NAME in deprecated create=true case:
+using System.IO;
 using Lucene.Net.Support;
 using IndexFileNameFilter = Lucene.Net.Index.IndexFileNameFilter;
 using IndexWriter = Lucene.Net.Index.IndexWriter;
@@ -108,7 +109,7 @@ namespace Lucene.Net.Store
         {
             try
             {
-                DIGESTER = Cryptography.GetHashAlgorithm();
+                DIGESTER = Cryptography.HashAlgorithm;
             }
             catch (System.Exception e)
             {
@@ -196,16 +197,16 @@ namespace Lucene.Net.Store
             if (lockFactory is FSLockFactory)
             {
                 FSLockFactory lf = (FSLockFactory)lockFactory;
-                System.IO.DirectoryInfo dir = lf.GetLockDir();
+                System.IO.DirectoryInfo dir = lf.LockDir;
                 // if the lock factory has no lockDir set, use the this directory as lockDir
                 if (dir == null)
                 {
-                    lf.SetLockDir(this.directory);
-                    lf.SetLockPrefix(null);
+                    lf.LockDir = this.directory;
+                    lf.LockPrefix = null;
                 }
                 else if (dir.FullName.Equals(this.directory.FullName))
                 {
-                    lf.SetLockPrefix(null);
+                    lf.LockPrefix = null;
                 }
             }
 		}
@@ -463,16 +464,20 @@ namespace Lucene.Net.Store
 
         // Java Lucene implements GetFile() which returns a FileInfo.
         // For Lucene.Net, GetDirectory() is more appropriate
-        public virtual System.IO.DirectoryInfo GetDirectory()
-        {
-            EnsureOpen();
-            return directory;
-        }
-		
-		/// <summary>For debug output. </summary>
+
+	    public virtual DirectoryInfo Directory
+	    {
+	        get
+	        {
+	            EnsureOpen();
+	            return directory;
+	        }
+	    }
+
+	    /// <summary>For debug output. </summary>
 		public override System.String ToString()
 		{
-            return this.GetType().FullName + "@" + directory + " lockFactory=" + GetLockFactory();
+            return this.GetType().FullName + "@" + directory + " lockFactory=" + LockFactory;
 		}
 		
 		/// <summary> Default read chunk size.  This is a conditional
@@ -485,50 +490,31 @@ namespace Lucene.Net.Store
 		
 		// LUCENE-1566
 		private int chunkSize = DEFAULT_READ_CHUNK_SIZE;
-		
-		/// <summary> Sets the maximum number of bytes read at once from the
-		/// underlying file during <see cref="IndexInput.ReadBytes(byte[], int, int)" />.
-		/// The default value is <see cref="DEFAULT_READ_CHUNK_SIZE" />;
-		/// 
-		/// <p/> This was introduced due to <a
-		/// href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6478546">Sun
-		/// JVM Bug 6478546</a>, which throws an incorrect
-		/// OutOfMemoryError when attempting to read too many bytes
-		/// at once.  It only happens on 32bit JVMs with a large
-		/// maximum heap size.<p/>
-		/// 
-		/// <p/>Changes to this value will not impact any
-		/// already-opened <see cref="IndexInput" />s.  You should call
-		/// this before attempting to open an index on the
-		/// directory.<p/>
-		/// 
-		/// <p/> <b>NOTE</b>: This value should be as large as
-		/// possible to reduce any possible performance impact.  If
-		/// you still encounter an incorrect OutOfMemoryError,
-		/// trying lowering the chunk size.<p/>
-		/// </summary>
-		public void  SetReadChunkSize(int chunkSize)
-		{
-			// LUCENE-1566
-			if (chunkSize <= 0)
-			{
-				throw new System.ArgumentException("chunkSize must be positive");
-			}
-			if (!Constants.JRE_IS_64BIT)
-			{
-				this.chunkSize = chunkSize;
-			}
-		}
-		
-		/// <summary> The maximum number of bytes to read at once from the
-		/// underlying file during <see cref="IndexInput.ReadBytes(byte[],int,int)" />.
-		/// </summary>
-		/// <seealso cref="SetReadChunkSize">
-		/// </seealso>
-		public int GetReadChunkSize()
-		{
-			// LUCENE-1566
-			return chunkSize;
-		}
+
+	    /// <summary> The maximum number of bytes to read at once from the
+	    /// underlying file during <see cref="IndexInput.ReadBytes(byte[],int,int)" />.
+	    /// </summary>
+	    /// <seealso cref="SetReadChunkSize">
+	    /// </seealso>
+	    public int ReadChunkSize
+	    {
+	        get
+	        {
+	            // LUCENE-1566
+	            return chunkSize;
+	        }
+	        set
+	        {
+	            // LUCENE-1566
+	            if (value <= 0)
+	            {
+	                throw new System.ArgumentException("chunkSize must be positive");
+	            }
+	            if (!Constants.JRE_IS_64BIT)
+	            {
+	                this.chunkSize = value;
+	            }
+	        }
+	    }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Store/FSLockFactory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/FSLockFactory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/FSLockFactory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/FSLockFactory.cs Mon Mar 12 22:29:26 2012
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.IO;
 
 namespace Lucene.Net.Store
 {
@@ -27,24 +28,25 @@ namespace Lucene.Net.Store
 		
 		/// <summary> Directory for the lock files.</summary>
 		protected internal System.IO.DirectoryInfo lockDir = null;
-		
-		/// <summary> Set the lock directory. This method can be only called
-		/// once to initialize the lock directory. It is used by <see cref="FSDirectory" />
-		/// to set the lock directory to itsself.
-		/// Subclasses can also use this method to set the directory
-		/// in the constructor.
-		/// </summary>
-		protected internal virtual void  SetLockDir(System.IO.DirectoryInfo lockDir)
-		{
-			if (this.lockDir != null)
-				throw new System.SystemException("You can set the lock directory for this factory only once.");
-			this.lockDir = lockDir;
-		}
-		
-		/// <summary> Retrieve the lock directory.</summary>
-		public virtual System.IO.DirectoryInfo GetLockDir()
-		{
-			return lockDir;
-		}
+
+        /// <summary> Gets the lock directory.
+        /// <para>Subclasses can use this to set the lock directory.
+        /// This method can be only called
+        /// once to initialize the lock directory. It is used by <see cref="FSDirectory" />
+        /// to set the lock directory to itsself.
+        /// Subclasses can also use this method to set the directory
+        /// in the constructor.
+        /// </para>
+        /// </summary>
+	    public virtual DirectoryInfo LockDir
+	    {
+	        get { return lockDir; }
+	        protected internal set
+	        {
+	            if (this.lockDir != null)
+	                throw new System.SystemException("You can set the lock directory for this factory only once.");
+	            this.lockDir = value;
+	        }
+	    }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Store/FileSwitchDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/FileSwitchDirectory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/FileSwitchDirectory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/FileSwitchDirectory.cs Mon Mar 12 22:29:26 2012
@@ -49,21 +49,21 @@ namespace Lucene.Net.Store
 			this.primaryDir = primaryDir;
 			this.secondaryDir = secondaryDir;
 			this.doClose = doClose;
-			this.lockFactory = primaryDir.GetLockFactory();
-		}
-		
-		/// <summary>Return the primary directory </summary>
-		public virtual Directory GetPrimaryDir()
-		{
-			return primaryDir;
-		}
-		
-		/// <summary>Return the secondary directory </summary>
-		public virtual Directory GetSecondaryDir()
-		{
-			return secondaryDir;
+			this.lockFactory = primaryDir.LockFactory;
 		}
 
+	    /// <summary>Return the primary directory </summary>
+	    public virtual Directory PrimaryDir
+	    {
+	        get { return primaryDir; }
+	    }
+
+	    /// <summary>Return the secondary directory </summary>
+	    public virtual Directory SecondaryDir
+	    {
+	        get { return secondaryDir; }
+	    }
+
 	    protected override void Dispose(bool disposing)
         {
             if (isDisposed) return;

Modified: incubator/lucene.net/trunk/src/core/Store/IndexInput.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/IndexInput.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/IndexInput.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/IndexInput.cs Mon Mar 12 22:29:26 2012
@@ -231,16 +231,16 @@ namespace Lucene.Net.Store
         }
 
 	    protected abstract void Dispose(bool disposing);
-		
-		/// <summary>Returns the current position in this file, where the next read will
-		/// occur.
-		/// </summary>
-		/// <seealso cref="Seek(long)">
-		/// </seealso>
-		public abstract long GetFilePointer();
-		
-		/// <summary>Sets current position in this file, where the next read will occur.</summary>
-		/// <seealso cref="GetFilePointer()">
+
+	    /// <summary>Returns the current position in this file, where the next read will
+	    /// occur.
+	    /// </summary>
+	    /// <seealso cref="Seek(long)">
+	    /// </seealso>
+	    public abstract long FilePointer { get; }
+
+	    /// <summary>Sets current position in this file, where the next read will occur.</summary>
+		/// <seealso cref="FilePointer">
 		/// </seealso>
 		public abstract void  Seek(long pos);
 		

Modified: incubator/lucene.net/trunk/src/core/Store/IndexOutput.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/IndexOutput.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/IndexOutput.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/IndexOutput.cs Mon Mar 12 22:29:26 2012
@@ -231,23 +231,23 @@ namespace Lucene.Net.Store
         }
 
 	    protected abstract void Dispose(bool disposing);
-		
-		/// <summary>Returns the current position in this file, where the next write will
-		/// occur.
-		/// </summary>
-		/// <seealso cref="Seek(long)">
-		/// </seealso>
-		public abstract long GetFilePointer();
-		
-		/// <summary>Sets current position in this file, where the next write will occur.</summary>
-		/// <seealso cref="GetFilePointer()">
+
+	    /// <summary>Returns the current position in this file, where the next write will
+	    /// occur.
+	    /// </summary>
+	    /// <seealso cref="Seek(long)">
+	    /// </seealso>
+	    public abstract long FilePointer { get; }
+
+	    /// <summary>Sets current position in this file, where the next write will occur.</summary>
+		/// <seealso cref="FilePointer()">
 		/// </seealso>
 		public abstract void  Seek(long pos);
-		
-		/// <summary>The number of bytes in the file. </summary>
-		public abstract long Length();
-		
-		/// <summary>Set the file length. By default, this method does
+
+	    /// <summary>The number of bytes in the file. </summary>
+	    public abstract long Length { get; }
+
+	    /// <summary>Set the file length. By default, this method does
 		/// nothing (it's optional for a Directory to implement
 		/// it).  But, certain Directory implementations (for
 		/// </summary>

Modified: incubator/lucene.net/trunk/src/core/Store/LockFactory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/LockFactory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/LockFactory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/LockFactory.cs Mon Mar 12 22:29:26 2012
@@ -40,28 +40,23 @@ namespace Lucene.Net.Store
 	{
 		
 		protected internal System.String lockPrefix = null;
-		
-		/// <summary> Set the prefix in use for all locks created in this
-		/// LockFactory.  This is normally called once, when a
-		/// Directory gets this LockFactory instance.  However, you
-		/// can also call this (after this instance is assigned to
-		/// a Directory) to override the prefix in use.  This
-		/// is helpful if you're running Lucene on machines that
-		/// have different mount points for the same shared
-		/// directory.
-		/// </summary>
-		public virtual void  SetLockPrefix(System.String lockPrefix)
-		{
-			this.lockPrefix = lockPrefix;
-		}
-		
-		/// <summary> Get the prefix in use for all locks created in this LockFactory.</summary>
-		public virtual System.String GetLockPrefix()
-		{
-			return this.lockPrefix;
-		}
-		
-		/// <summary> Return a new Lock instance identified by lockName.</summary>
+
+	    /// <summary> Gets or sets the prefix in use for all locks created in this
+	    /// LockFactory.  This is normally called once, when a
+	    /// Directory gets this LockFactory instance.  However, you
+	    /// can also call this (after this instance is assigned to
+	    /// a Directory) to override the prefix in use.  This
+	    /// is helpful if you're running Lucene on machines that
+	    /// have different mount points for the same shared
+	    /// directory.
+	    /// </summary>
+	    public virtual string LockPrefix
+	    {
+	        get { return this.lockPrefix; }
+	        set { this.lockPrefix = value; }
+	    }
+
+	    /// <summary> Return a new Lock instance identified by lockName.</summary>
 		/// <param name="lockName">name of the lock to be created.
 		/// </param>
 		public abstract Lock MakeLock(System.String lockName);

Modified: incubator/lucene.net/trunk/src/core/Store/LockStressTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/LockStressTest.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/LockStressTest.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/LockStressTest.cs Mon Mar 12 22:29:26 2012
@@ -89,14 +89,14 @@ namespace Lucene.Net.Store
 			
 			if (lockFactory is NativeFSLockFactory)
 			{
-				((NativeFSLockFactory) lockFactory).SetLockDir(lockDir);
+				((NativeFSLockFactory) lockFactory).LockDir = lockDir;
 			}
 			else if (lockFactory is SimpleFSLockFactory)
 			{
-				((SimpleFSLockFactory) lockFactory).SetLockDir(lockDir);
+				((SimpleFSLockFactory) lockFactory).LockDir = lockDir;
 			}
 			
-			lockFactory.SetLockPrefix("test");
+			lockFactory.LockPrefix = "test";
 			
 			LockFactory verifyLF = new VerifyingLockFactory((sbyte) myID, lockFactory, verifierHost, verifierPort);
 			

Modified: incubator/lucene.net/trunk/src/core/Store/MMapDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/MMapDirectory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/MMapDirectory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/MMapDirectory.cs Mon Mar 12 22:29:26 2012
@@ -135,35 +135,31 @@ namespace Lucene.Net.Store
 		
 		/// <summary> <c>true</c>, if this platform supports unmapping mmaped files.</summary>
 		public static bool UNMAP_SUPPORTED;
-		
-		/// <summary> This method enables the workaround for unmapping the buffers
-		/// from address space after closing <see cref="IndexInput" />, that is
-		/// mentioned in the bug report. This hack may fail on non-Sun JVMs.
-		/// It forcefully unmaps the buffer on close by using
-		/// an undocumented internal cleanup functionality.
-		/// <p/><b>NOTE:</b> Enabling this is completely unsupported
-		/// by Java and may lead to JVM crashs if <c>IndexInput</c>
-		/// is closed while another thread is still accessing it (SIGSEGV).
-		/// </summary>
-		/// <throws>  IllegalArgumentException if <see cref="UNMAP_SUPPORTED" /> </throws>
-		/// <summary> is <c>false</c> and the workaround cannot be enabled.
-		/// </summary>
-		public virtual void  SetUseUnmap(bool useUnmapHack)
-		{
-			if (useUnmapHack && !UNMAP_SUPPORTED)
-				throw new System.ArgumentException("Unmap hack not supported on this platform!");
-			this.useUnmapHack = useUnmapHack;
-		}
-		
-		/// <summary> Returns <c>true</c>, if the unmap workaround is enabled.</summary>
-		/// <seealso cref="SetUseUnmap">
-		/// </seealso>
-		public virtual bool GetUseUnmap()
-		{
-			return useUnmapHack;
-		}
-		
-		/// <summary> Try to unmap the buffer, this method silently fails if no support
+
+	    /// <summary> Enables or disables the workaround for unmapping the buffers
+	    /// from address space after closing <see cref="IndexInput" />, that is
+	    /// mentioned in the bug report. This hack may fail on non-Sun JVMs.
+	    /// It forcefully unmaps the buffer on close by using
+	    /// an undocumented internal cleanup functionality.
+	    /// <p/><b>NOTE:</b> Enabling this is completely unsupported
+	    /// by Java and may lead to JVM crashs if <c>IndexInput</c>
+	    /// is closed while another thread is still accessing it (SIGSEGV).
+	    /// </summary>
+	    /// <throws>  IllegalArgumentException if <see cref="UNMAP_SUPPORTED" /> </throws>
+	    /// <summary> is <c>false</c> and the workaround cannot be enabled.
+	    /// </summary>
+	    public virtual bool UseUnmap
+	    {
+	        get { return useUnmapHack; }
+	        set
+	        {
+	            if (value && !UNMAP_SUPPORTED)
+	                throw new System.ArgumentException("Unmap hack not supported on this platform!");
+	            this.useUnmapHack = value;
+	        }
+	    }
+
+	    /// <summary> Try to unmap the buffer, this method silently fails if no support
 		/// for that in the JVM. On Windows, this leads to the fact,
 		/// that mmapped files cannot be modified or deleted.
 		/// </summary>
@@ -184,33 +180,29 @@ namespace Lucene.Net.Store
 				}
 			}
 		}
-		
-		/// <summary> Sets the maximum chunk size (default is <see cref="int.MaxValue" /> for
-		/// 64 bit JVMs and 256 MiBytes for 32 bit JVMs) used for memory mapping.
-		/// Especially on 32 bit platform, the address space can be very fragmented,
-		/// so large index files cannot be mapped.
-		/// Using a lower chunk size makes the directory implementation a little
-		/// bit slower (as the correct chunk must be resolved on each seek)
-		/// but the chance is higher that mmap does not fail. On 64 bit
-		/// Java platforms, this parameter should always be <see cref="int.MaxValue" />,
-		/// as the adress space is big enough.
-		/// </summary>
-		public virtual void  SetMaxChunkSize(int maxBBuf)
-		{
-			if (maxBBuf <= 0)
-				throw new System.ArgumentException("Maximum chunk size for mmap must be >0");
-			this.maxBBuf = maxBBuf;
-		}
-		
-		/// <summary> Returns the current mmap chunk size.</summary>
-		/// <seealso cref="SetMaxChunkSize">
-		/// </seealso>
-		public virtual int GetMaxChunkSize()
-		{
-			return maxBBuf;
-		}
-		
-		private class MMapIndexInput : IndexInput
+
+	    /// <summary> Gets or sets the maximum chunk size (default is <see cref="int.MaxValue" /> for
+	    /// 64 bit JVMs and 256 MiBytes for 32 bit JVMs) used for memory mapping.
+	    /// Especially on 32 bit platform, the address space can be very fragmented,
+	    /// so large index files cannot be mapped.
+	    /// Using a lower chunk size makes the directory implementation a little
+	    /// bit slower (as the correct chunk must be resolved on each seek)
+	    /// but the chance is higher that mmap does not fail. On 64 bit
+	    /// Java platforms, this parameter should always be <see cref="int.MaxValue" />,
+	    /// as the adress space is big enough.
+	    /// </summary>
+	    public virtual int MaxChunkSize
+	    {
+	        get { return maxBBuf; }
+	        set
+	        {
+	            if (value <= 0)
+	                throw new System.ArgumentException("Maximum chunk size for mmap must be >0");
+	            this.maxBBuf = value;
+	        }
+	    }
+
+	    private class MMapIndexInput : IndexInput
 		{
 			private void  InitBlock(MMapDirectory enclosingInstance)
 			{
@@ -264,13 +256,17 @@ namespace Lucene.Net.Store
 					throw new System.IO.IOException("read past EOF");
 				}
 			}
-			
-			public override long GetFilePointer()
-			{
-				return buffer.Position;;
-			}
-			
-			public override void  Seek(long pos)
+
+		    public override long FilePointer
+		    {
+		        get
+		        {
+		            return buffer.Position;
+		            ;
+		        }
+		    }
+
+		    public override void  Seek(long pos)
 			{
 				buffer.Seek(pos, System.IO.SeekOrigin.Begin);
 			}
@@ -417,13 +413,13 @@ namespace Lucene.Net.Store
 				curBuf.Read(b, offset, len);
 				curAvail -= len;
 			}
-			
-			public override long GetFilePointer()
-			{
-				return ((long) curBufIndex * maxBufSize) + curBuf.Position;
-			}
-			
-			public override void  Seek(long pos)
+
+		    public override long FilePointer
+		    {
+		        get { return ((long) curBufIndex*maxBufSize) + curBuf.Position; }
+		    }
+
+		    public override void  Seek(long pos)
 			{
 				curBufIndex = (int) (pos / maxBufSize);
 				curBuf = buffers[curBufIndex];
@@ -451,7 +447,7 @@ namespace Lucene.Net.Store
 				}
 				try
 				{
-					clone.Seek(GetFilePointer());
+					clone.Seek(FilePointer);
 				}
 				catch (System.IO.IOException ioe)
 				{
@@ -493,7 +489,7 @@ namespace Lucene.Net.Store
 		public override IndexInput OpenInput(System.String name, int bufferSize)
 		{
 			EnsureOpen();
-			System.String path = System.IO.Path.Combine(GetDirectory().FullName, name);
+			System.String path = System.IO.Path.Combine(Directory.FullName, name);
 			System.IO.FileStream raf = new System.IO.FileStream(path, System.IO.FileMode.Open, System.IO.FileAccess.Read);
 			try
 			{

Modified: incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs Mon Mar 12 22:29:26 2012
@@ -81,7 +81,7 @@ namespace Lucene.Net.Store
         /// </param>
         public NativeFSLockFactory(System.IO.DirectoryInfo lockDir)
         {
-            SetLockDir(lockDir);
+            LockDir = lockDir;
         }
 		
 		public override Lock MakeLock(System.String lockName)

Modified: incubator/lucene.net/trunk/src/core/Store/NoLockFactory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/NoLockFactory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/NoLockFactory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/NoLockFactory.cs Mon Mar 12 22:29:26 2012
@@ -21,7 +21,7 @@ namespace Lucene.Net.Store
 {
 	
 	/// <summary> Use this <see cref="LockFactory" /> to disable locking entirely.
-	/// Only one instance of this lock is created.  You should call <see cref="GetNoLockFactory()" />
+	/// Only one instance of this lock is created.  You should call <see cref="Instance" />
 	/// to get the instance.
 	/// 
 	/// </summary>
@@ -34,13 +34,13 @@ namespace Lucene.Net.Store
 		// Single instance returned whenever makeLock is called.
 		private static NoLock singletonLock = new NoLock();
 		private static NoLockFactory singleton = new NoLockFactory();
-		
-		public static NoLockFactory GetNoLockFactory()
-		{
-			return singleton;
-		}
-		
-		public override Lock MakeLock(System.String lockName)
+
+	    public static NoLockFactory Instance
+	    {
+	        get { return singleton; }
+	    }
+
+	    public override Lock MakeLock(System.String lockName)
 		{
 			return singletonLock;
 		}

Modified: incubator/lucene.net/trunk/src/core/Store/RAMDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/RAMDirectory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/RAMDirectory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/RAMDirectory.cs Mon Mar 12 22:29:26 2012
@@ -121,7 +121,7 @@ namespace Lucene.Net.Store
 			}
 			if (file == null)
 				throw new System.IO.FileNotFoundException(name);
-			return file.GetLastModified();
+			return file.LastModified;
 		}
 		
 		/// <summary>Set the modified time of an existing file to now.</summary>
@@ -155,7 +155,7 @@ namespace Lucene.Net.Store
 			}
 			while (ts1 == ts2);
 			
-			file.SetLastModified(ts2);
+			file.LastModified = ts2;
 		}
 		
 		/// <summary>Returns the length in bytes of a file in the directory.</summary>
@@ -170,7 +170,7 @@ namespace Lucene.Net.Store
 			}
 			if (file == null)
 				throw new System.IO.FileNotFoundException(name);
-			return file.GetLength();
+			return file.Length;
 		}
 		
 		/// <summary>Return total size in bytes of all files in this

Modified: incubator/lucene.net/trunk/src/core/Store/RAMFile.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/RAMFile.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/RAMFile.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/RAMFile.cs Mon Mar 12 22:29:26 2012
@@ -45,40 +45,46 @@ namespace Lucene.Net.Store
 		}
 		
 		// For non-stream access from thread that might be concurrent with writing
-		public /*internal*/ virtual long GetLength()
-		{
-			lock (this)
-			{
-				return length;
-			}
-		}
-		
-		public /*internal*/ virtual void  SetLength(long length)
-		{
-			lock (this)
-			{
-				this.length = length;
-			}
-		}
-		
-		// For non-stream access from thread that might be concurrent with writing
-		internal virtual long GetLastModified()
-		{
-			lock (this)
-			{
-				return lastModified;
-			}
-		}
-		
-		internal virtual void  SetLastModified(long lastModified)
-		{
-			lock (this)
-			{
-				this.lastModified = lastModified;
-			}
-		}
-		
-		internal byte[] AddBuffer(int size)
+
+	    internal virtual long Length
+	    {
+	        get
+	        {
+	            lock (this)
+	            {
+	                return length;
+	            }
+	        }
+	        set
+	        {
+	            lock (this)
+	            {
+	                this.length = value;
+	            }
+	        }
+	    }
+
+	    // For non-stream access from thread that might be concurrent with writing
+
+	    internal virtual long LastModified
+	    {
+	        get
+	        {
+	            lock (this)
+	            {
+	                return lastModified;
+	            }
+	        }
+	        set
+	        {
+	            lock (this)
+	            {
+	                this.lastModified = value;
+	            }
+	        }
+	    }
+
+	    internal byte[] AddBuffer(int size)
 		{
             byte[] buffer = NewBuffer(size);
             lock (this)
@@ -125,30 +131,17 @@ namespace Lucene.Net.Store
 		{
 			return new byte[size];
 		}
-		
-		
-		public /*internal*/ virtual long GetSizeInBytes()
-		{
-            lock (this)
-            {
-                return sizeInBytes;
-            }
-		}
 
-        public long length_ForNUnit
-        {
-            get { return length; }
-        }
-
-        public RAMDirectory directory_ForNUnit
-        {
-            get { return directory; }
-            set { directory = value; }
-        }
-
-        public long sizeInBytes_ForNUnit
-        {
-            get { return sizeInBytes; }
-        }
+
+	    public virtual long SizeInBytes
+	    {
+	        get
+	        {
+	            lock (this)
+	            {
+	                return sizeInBytes;
+	            }
+	        }
+	    }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Store/RAMInputStream.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/RAMInputStream.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/RAMInputStream.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/RAMInputStream.cs Mon Mar 12 22:29:26 2012
@@ -114,13 +114,13 @@ namespace Lucene.Net.Store
 				bufferLength = buflen > BUFFER_SIZE?BUFFER_SIZE:(int) buflen;
 			}
 		}
-		
-		public override long GetFilePointer()
-		{
-			return currentBufferIndex < 0?0:bufferStart + bufferPosition;
-		}
-		
-		public override void  Seek(long pos)
+
+	    public override long FilePointer
+	    {
+	        get { return currentBufferIndex < 0 ? 0 : bufferStart + bufferPosition; }
+	    }
+
+	    public override void  Seek(long pos)
 		{
 			if (currentBuffer == null || pos < bufferStart || pos >= bufferStart + BUFFER_SIZE)
 			{

Modified: incubator/lucene.net/trunk/src/core/Store/RAMOutputStream.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/RAMOutputStream.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/RAMOutputStream.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/RAMOutputStream.cs Mon Mar 12 22:29:26 2012
@@ -83,7 +83,7 @@ namespace Lucene.Net.Store
             bufferStart = 0;
             bufferLength = 0;
 			
-			file.SetLength(0);
+			file.Length = 0;
 		}
 		
         protected override void Dispose(bool disposing)
@@ -111,13 +111,13 @@ namespace Lucene.Net.Store
 			
 			bufferPosition = (int) (pos % BUFFER_SIZE);
 		}
-		
-		public override long Length()
-		{
-			return file.length;
-		}
-		
-		public override void  WriteByte(byte b)
+
+	    public override long Length
+	    {
+	        get { return file.length; }
+	    }
+
+	    public override void  WriteByte(byte b)
 		{
 			if (bufferPosition == bufferLength)
 			{
@@ -167,22 +167,22 @@ namespace Lucene.Net.Store
 			long pointer = bufferStart + bufferPosition;
 			if (pointer > file.length)
 			{
-				file.SetLength(pointer);
+				file.Length = pointer;
 			}
 		}
 		
 		public override void  Flush()
 		{
-			file.SetLastModified((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond));
+			file.LastModified = (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond);
 			SetFileLength();
 		}
-		
-		public override long GetFilePointer()
-		{
-			return currentBufferIndex < 0?0:bufferStart + bufferPosition;
-		}
-		
-		/// <summary>Returns byte usage of all buffers. </summary>
+
+	    public override long FilePointer
+	    {
+	        get { return currentBufferIndex < 0 ? 0 : bufferStart + bufferPosition; }
+	    }
+
+	    /// <summary>Returns byte usage of all buffers. </summary>
 		public virtual long SizeInBytes()
 		{
 			return file.NumBuffers() * BUFFER_SIZE;

Modified: incubator/lucene.net/trunk/src/core/Store/SimpleFSDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/SimpleFSDirectory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/SimpleFSDirectory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/SimpleFSDirectory.cs Mon Mar 12 22:29:26 2012
@@ -70,7 +70,7 @@ namespace Lucene.Net.Store
                 try
                 {
                     return new SimpleFSIndexInput(new System.IO.FileInfo(
-                        System.IO.Path.Combine(directory.FullName, name)), bufferSize, GetReadChunkSize());
+                        System.IO.Path.Combine(directory.FullName, name)), bufferSize, ReadChunkSize);
                 }
                 catch (System.UnauthorizedAccessException ex)
                 {
@@ -148,7 +148,7 @@ namespace Lucene.Net.Store
 			{
 				lock (file)
 				{
-					long position = GetFilePointer();
+					long position = FilePointer;
 					if (position != file.position)
 					{
 						file.BaseStream.Seek(position, System.IO.SeekOrigin.Begin);
@@ -306,11 +306,13 @@ namespace Lucene.Net.Store
 				base.Seek(pos);
 				file.Seek(pos, System.IO.SeekOrigin.Begin);
 			}
-			public override long Length()
-			{
-				return file.Length;
-			}
-			public override void  SetLength(long length)
+
+		    public override long Length
+		    {
+		        get { return file.Length; }
+		    }
+
+		    public override void  SetLength(long length)
 			{
 				file.SetLength(length);
 			}

Modified: incubator/lucene.net/trunk/src/core/Store/SimpleFSLockFactory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/SimpleFSLockFactory.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/SimpleFSLockFactory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/SimpleFSLockFactory.cs Mon Mar 12 22:29:26 2012
@@ -68,7 +68,7 @@ namespace Lucene.Net.Store
         /// </param>
         public SimpleFSLockFactory(System.IO.DirectoryInfo lockDir)
         {
-            SetLockDir(lockDir);
+            LockDir = lockDir;
         }
 		
 		/// <summary> Instantiate using the provided directory name (String).</summary>

Modified: incubator/lucene.net/trunk/src/core/Support/Cryptography.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Support/Cryptography.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Support/Cryptography.cs (original)
+++ incubator/lucene.net/trunk/src/core/Support/Cryptography.cs Mon Mar 12 22:29:26 2012
@@ -2,20 +2,23 @@
 
 namespace Lucene.Net.Support
 {
-    public class Cryptography
+    public static class Cryptography
     {
-        static public bool FIPSCompliant = false;
+        public static bool FIPSCompliant = false;
 
-        static public System.Security.Cryptography.HashAlgorithm GetHashAlgorithm()
+        public static HashAlgorithm HashAlgorithm
         {
-            if (FIPSCompliant)
+            get
             {
-                //LUCENENET-175
-                //No Assumptions should be made on the HashAlgorithm. It may change in time.
-                //SHA256 SHA384 SHA512 etc.
-                return SHA1.Create();
+                if (FIPSCompliant)
+                {
+                    //LUCENENET-175
+                    //No Assumptions should be made on the HashAlgorithm. It may change in time.
+                    //SHA256 SHA384 SHA512 etc.
+                    return SHA1.Create();
+                }
+                return MD5.Create();
             }
-            return MD5.Create();
         }
     }
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Util/AverageGuessMemoryModel.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/AverageGuessMemoryModel.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/AverageGuessMemoryModel.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/AverageGuessMemoryModel.cs Mon Mar 12 22:29:26 2012
@@ -53,25 +53,27 @@ namespace Lucene.Net.Util
 		* 
 		* <see cref="Lucene.Net.Util.MemoryModel.getArraySize()"/>
 		*/
-		public override int GetArraySize()
-		{
-			return 16;
-		}
-		
-		/*
+
+	    public override int ArraySize
+	    {
+	        get { return 16; }
+	    }
+
+	    /*
 		* (non-Javadoc)
 		* 
 		* <see cref="Lucene.Net.Util.MemoryModel.getClassSize()"/>
 		*/
-		public override int GetClassSize()
-		{
-			return 8;
-		}
-		
-		/* (non-Javadoc)
+
+	    public override int ClassSize
+	    {
+	        get { return 8; }
+	    }
+
+	    /* (non-Javadoc)
 		* <see cref="Lucene.Net.Util.MemoryModel.getPrimitiveSize(java.lang.Class)"/>
 		*/
-		public override int GetPrimitiveSize(System.Type clazz)
+		public override int GetPrimitiveSize(Type clazz)
 		{
 			return sizes[clazz];
 		}
@@ -79,9 +81,10 @@ namespace Lucene.Net.Util
 		/* (non-Javadoc)
 		* <see cref="Lucene.Net.Util.MemoryModel.getReferenceSize()"/>
 		*/
-		public override int GetReferenceSize()
-		{
-			return 4;
-		}
+
+	    public override int ReferenceSize
+	    {
+	        get { return 4; }
+	    }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Util/BitVector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/BitVector.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/BitVector.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/BitVector.cs Mon Mar 12 22:29:26 2012
@@ -147,6 +147,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// For testing 
         /// </summary>
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
         public int GetRecomputedCount()
         {
             int c = 0;

Modified: incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs Mon Mar 12 22:29:26 2012
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Collections;
 using Lucene.Net.Support;
 using DocIdSet = Lucene.Net.Search.DocIdSet;
 using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
@@ -37,19 +38,19 @@ namespace Lucene.Net.Util
 			return new DocIdBitSetIterator(bitSet);
 		}
 
-		/// <summary>This DocIdSet implementation is cacheable.</summary>
-		public override bool IsCacheable()
-		{
-			return true;
-		}
-		
-		/// <summary> Returns the underlying BitSet. </summary>
-		public virtual System.Collections.BitArray GetBitSet()
-		{
-			return this.bitSet;
-		}
-		
-		private class DocIdBitSetIterator:DocIdSetIterator
+	    /// <summary>This DocIdSet implementation is cacheable.</summary>
+	    public override bool IsCacheable
+	    {
+	        get { return true; }
+	    }
+
+	    /// <summary> Returns the underlying BitSet. </summary>
+	    public virtual BitArray BitSet
+	    {
+	        get { return this.bitSet; }
+	    }
+
+	    private class DocIdBitSetIterator:DocIdSetIterator
 		{
 			private int docId;
 			private System.Collections.BitArray bitSet;

Modified: incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs Mon Mar 12 22:29:26 2012
@@ -127,12 +127,12 @@ namespace Lucene.Net.Util
 			for (int i = 0; i < cacheEntries.Length; i++)
 			{
 				CacheEntry item = cacheEntries[i];
-				System.Object val = item.GetValue();
+				System.Object val = item.Value;
 				
 				if (val is Lucene.Net.Search.CreationPlaceholder)
 					continue;
 				
-				ReaderField rf = new ReaderField(item.GetReaderKey(), item.GetFieldName());
+				ReaderField rf = new ReaderField(item.ReaderKey, item.FieldName);
 				
 				System.Int32 valId = val.GetHashCode();
 				
@@ -170,8 +170,8 @@ namespace Lucene.Net.Util
 			{
 				// we have multiple values for some ReaderFields
 				
-                IDictionary<ReaderField,HashSet<int>> rfMap = readerFieldToValIds.GetMap();
-                IDictionary<int,HashSet<CacheEntry>> valMap = valIdToItems.GetMap();
+                IDictionary<ReaderField,HashSet<int>> rfMap = readerFieldToValIds.Map;
+                IDictionary<int,HashSet<CacheEntry>> valMap = valIdToItems.Map;
                 foreach (ReaderField rf in valMismatchKeys)
                 {
                     List<CacheEntry> badEntries = new List<CacheEntry>(valMismatchKeys.Count * 2);
@@ -205,8 +205,8 @@ namespace Lucene.Net.Util
             Dictionary<ReaderField, HashSet<ReaderField>> badChildren = new Dictionary<ReaderField, HashSet<ReaderField>>(17);
 			MapOfSets<ReaderField, ReaderField> badKids = new MapOfSets<ReaderField, ReaderField>(badChildren); // wrapper
 
-            IDictionary<int, HashSet<CacheEntry>> viToItemSets = valIdToItems.GetMap();
-            IDictionary<ReaderField, HashSet<int>> rfToValIdSets = readerFieldToValIds.GetMap();
+            IDictionary<int, HashSet<CacheEntry>> viToItemSets = valIdToItems.Map;
+            IDictionary<ReaderField, HashSet<int>> rfToValIdSets = readerFieldToValIds.Map;
 
             HashSet<ReaderField> seen = new HashSet<ReaderField>();
 
@@ -281,10 +281,10 @@ namespace Lucene.Net.Util
 				System.Object obj = all[i];
 				if (obj is IndexReader)
 				{
-					IndexReader[] subs = ((IndexReader) obj).GetSequentialSubReaders();
+					IndexReader[] subs = ((IndexReader) obj).SequentialSubReaders;
 					for (int j = 0; (null != subs) && (j < subs.Length); j++)
 					{
-						all.Add(subs[j].GetFieldCacheKey());
+						all.Add(subs[j].FieldCacheKey);
 					}
 				}
 			}
@@ -343,17 +343,20 @@ namespace Lucene.Net.Util
 				this.msg = msg;
 				this.entries = entries;
 			}
-			/// <summary> Type of insane behavior this object represents</summary>
-			public new InsanityType GetType()
-			{
-				return type;
-			}
-			/// <summary> Description of hte insane behavior</summary>
-			public System.String GetMsg()
-			{
-				return msg;
-			}
-			/// <summary> CacheEntry objects which suggest a problem</summary>
+
+		    /// <summary> Type of insane behavior this object represents</summary>
+		    public InsanityType Type
+		    {
+		        get { return type; }
+		    }
+
+		    /// <summary> Description of hte insane behavior</summary>
+		    public string Msg
+		    {
+		        get { return msg; }
+		    }
+
+		    /// <summary> CacheEntry objects which suggest a problem</summary>
 			public CacheEntry[] GetCacheEntries()
 			{
 				return entries;
@@ -365,9 +368,9 @@ namespace Lucene.Net.Util
 			public override System.String ToString()
 			{
 				System.Text.StringBuilder buf = new System.Text.StringBuilder();
-				buf.Append(GetType()).Append(": ");
+				buf.Append(Type).Append(": ");
 				
-				System.String m = GetMsg();
+				System.String m = Msg;
 				if (null != m)
 					buf.Append(m);
 				

Modified: incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs Mon Mar 12 22:29:26 2012
@@ -32,15 +32,14 @@ namespace Lucene.Net.Util
 		{
 			theMap = m;
 		}
-		
-		/// <returns> direct access to the map backing this object.
-		/// </returns>
-        public virtual IDictionary<TKey, HashSet<TValue>> GetMap()
-		{
-			return theMap;
-		}
-		
-		/// <summary> Adds val to the Set associated with key in the Map.  If key is not 
+
+	    /// <value> direct access to the map backing this object. </value>
+	    public virtual IDictionary<TKey, HashSet<TValue>> Map
+	    {
+	        get { return theMap; }
+	    }
+
+	    /// <summary> Adds val to the Set associated with key in the Map.  If key is not 
 		/// already in the map, a new Set will first be created.
 		/// </summary>
 		/// <returns> the size of the Set associated with key once val is added to it.

Modified: incubator/lucene.net/trunk/src/core/Util/MemoryModel.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/MemoryModel.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/MemoryModel.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/MemoryModel.cs Mon Mar 12 22:29:26 2012
@@ -25,24 +25,20 @@ namespace Lucene.Net.Util
 	/// </summary>
 	public abstract class MemoryModel
 	{
-		
-		/// <returns> size of array beyond contents
-		/// </returns>
-		public abstract int GetArraySize();
-		
-		/// <returns> Class size overhead
-		/// </returns>
-		public abstract int GetClassSize();
-		
-		/// <param name="clazz">a primitive Class - bool, byte, char, short, long, float,
+	    /// <value> size of array beyond contents </value>
+	    public abstract int ArraySize { get; }
+
+	    /// <value> Class size overhead </value>
+	    public abstract int ClassSize { get; }
+
+	    /// <param name="clazz">a primitive Class - bool, byte, char, short, long, float,
 		/// short, double, int
 		/// </param>
 		/// <returns> the size in bytes of given primitive Class
 		/// </returns>
 		public abstract int GetPrimitiveSize(System.Type clazz);
-		
-		/// <returns> size of reference
-		/// </returns>
-		public abstract int GetReferenceSize();
+
+	    /// <value> size of reference </value>
+	    public abstract int ReferenceSize { get; }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs Mon Mar 12 22:29:26 2012
@@ -122,13 +122,13 @@ namespace Lucene.Net.Util
 			return new OpenBitSetIterator(bits, wlen);
 		}
 
-		/// <summary>This DocIdSet implementation is cacheable. </summary>
-		public override bool IsCacheable()
-		{
-			return true;
-		}
-		
-		/// <summary>Returns the current capacity in bits (1 greater than the index of the last bit) </summary>
+	    /// <summary>This DocIdSet implementation is cacheable. </summary>
+	    public override bool IsCacheable
+	    {
+	        get { return true; }
+	    }
+
+	    /// <summary>Returns the current capacity in bits (1 greater than the index of the last bit) </summary>
 		public virtual long Capacity()
 		{
 			return bits.Length << 6;
@@ -147,34 +147,23 @@ namespace Lucene.Net.Util
 		{
 			return Cardinality() == 0;
 		}
-		
-		/// <summary>Expert: returns the long[] storing the bits </summary>
-		public virtual long[] GetBits()
-		{
-			return bits;
-		}
-		
-		/// <summary>Expert: sets a new long[] to use as the bit storage </summary>
-		public virtual void  SetBits(long[] bits)
-		{
-			this.bits = bits;
-		}
-		
-		/// <summary>Expert: gets the number of longs in the array that are in use </summary>
-		public virtual int GetNumWords()
-		{
-			return wlen;
-		}
-		
-		/// <summary>Expert: sets the number of longs in the array that are in use </summary>
-		public virtual void  SetNumWords(int nWords)
-		{
-			this.wlen = nWords;
-		}
-		
-		
-		
-		/// <summary>Returns true or false for the specified bit index. </summary>
+
+	    /// <summary>Expert: gets or sets the long[] storing the bits </summary>
+	    public virtual long[] Bits
+	    {
+	        get { return bits; }
+	        set { this.bits = value; }
+	    }
+
+	    /// <summary>Expert: gets or sets the number of longs in the array that are in use </summary>
+	    public virtual int NumWords
+	    {
+	        get { return wlen; }
+	        set { this.wlen = value; }
+	    }
+
+
+	    /// <summary>Returns true or false for the specified bit index. </summary>
 		public virtual bool Get(int index)
 		{
 			int i = index >> 6; // div 64

Modified: incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs (original)
+++ incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs Mon Mar 12 22:29:26 2012
@@ -107,7 +107,7 @@ namespace Lucene.Net.Util
 		private int indexArray;
 		private int curDocId = - 1;
 		
-		public OpenBitSetIterator(OpenBitSet obs):this(obs.GetBits(), obs.GetNumWords())
+		public OpenBitSetIterator(OpenBitSet obs):this(obs.Bits, obs.NumWords)
 		{
 		}
 		



Mime
View raw message