lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [Lucene.Net] svn commit: r1157316 - in /incubator/lucene.net/branches/Lucene.Net_4e: build/scripts/ src/Lucene.Net/ src/Lucene.Net/Analysis/ src/Lucene.Net/Analysis/TokenAttributes/ src/Lucene.Net/Util/ test/Lucene.Net.Test/Util/
Date Sat, 13 Aug 2011 04:35:24 GMT
Author: mherndon
Date: Sat Aug 13 04:35:23 2011
New Revision: 1157316

URL: http://svn.apache.org/viewvc?rev=1157316&view=rev
Log:
last bit of fxcop changes to suppress messages for naming things flags, attributes, etc

Added:
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Lucene.Net.idc
Modified:
    incubator/lucene.net/branches/Lucene.Net_4e/build/scripts/CustomDictionary.xml
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IKeywordAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IOffsetAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPayloadAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPositionIncrementAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITypeAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenStream.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/BytesRef.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/IAttribute.cs
    incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/RamUsageEstimator.cs
    incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs

Modified: incubator/lucene.net/branches/Lucene.Net_4e/build/scripts/CustomDictionary.xml
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/build/scripts/CustomDictionary.xml?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/build/scripts/CustomDictionary.xml (original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/build/scripts/CustomDictionary.xml Sat Aug
13 04:35:23 2011
@@ -1,9 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
 <Dictionary>
 	<Words>
 		 <Recognized>
             <Word>Lucene</Word>
             <Word>Util</Word>
+            <Word>Num</Word>
          </Recognized>
   	</Words>
-  
-<Dictionary>
\ No newline at end of file
+</Dictionary>
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -23,6 +23,7 @@ namespace Lucene.Net.Analysis.TokenAttri
 {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using System.Linq;
     using System.Text;
     using Support;
@@ -56,6 +57,9 @@ namespace Lucene.Net.Analysis.TokenAttri
     ///         all implement this interface.  C# does not have a known equivalent.
     ///     </para>
     /// </remarks>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public class CharTermAttribute : AttributeBase, ICharTermAttribute
     {
         private const int MinBufferSize = 10;
@@ -398,7 +402,7 @@ namespace Lucene.Net.Analysis.TokenAttri
 
         private static char[] CreateBuffer(int length)
         {
-            return new char[ArrayUtil.Oversize(length, RamUsageEstimator.NumBytesChar)];
+            return new char[ArrayUtil.Oversize(length, RamUsageEstimator.NumberOfBytesChar)];
         }
 
         private CharTermAttribute AppendNull()

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -22,6 +22,7 @@
 namespace Lucene.Net.Analysis.TokenAttributes
 {
     using System;
+    using System.Diagnostics.CodeAnalysis;
     using Support;
     using Util;
 
@@ -50,6 +51,11 @@ namespace Lucene.Net.Analysis.TokenAttri
     ///         </para>
     ///     </note>
     /// </remarks>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
+    [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms",
+    Justification = "Again, using the class name from java and its appropriate.")]
     public class FlagsAttribute : AttributeBase, IFlagsAttribute
     {
         /// <summary>
@@ -63,6 +69,8 @@ namespace Lucene.Net.Analysis.TokenAttri
         /// Initializes a new instance of the <see cref="FlagsAttribute"/> class.
         /// </summary>
         /// <param name="flags">The flags.</param>
+            [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms",
+            Justification = "The variable name is appropriate.")]
         public FlagsAttribute(int flags)
         {
             this.Flags = flags;
@@ -72,6 +80,8 @@ namespace Lucene.Net.Analysis.TokenAttri
         /// Gets or sets the flags.
         /// </summary>
         /// <value>The flags.</value>
+        [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms",
+        Justification = "The name is appropriate.")]
         public int Flags { get; set; }
 
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ICharTermAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -22,8 +22,8 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
-    using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using System.Text;
     using Util;
 
@@ -45,6 +45,9 @@ namespace Lucene.Net.Analysis.TokenAttri
     ///         </para>
     ///     </note>
     /// </remarks>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public interface ICharTermAttribute : IAttribute
     {
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -21,6 +21,7 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
+    using System.Diagnostics.CodeAnalysis;
     using Util;
 
     /// <summary>
@@ -40,12 +41,19 @@ namespace Lucene.Net.Analysis.TokenAttri
     ///         </para>
     ///     </note>
     /// </remarks>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
+    [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms",
+        Justification = "Again, using the class name from java and its appropriate.")]
     public interface IFlagsAttribute : IAttribute
     {
         /// <summary>
         /// Gets or sets the flags.
         /// </summary>
         /// <value>The flags.</value>
+        [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms",
+        Justification = "The name is appropriate.")]
         int Flags { get; set; }
     }
 }

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IKeywordAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IKeywordAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IKeywordAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IKeywordAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -21,6 +21,8 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
+    using System.Diagnostics.CodeAnalysis;
+
     /// <summary>
     /// The contract for attributes that can be used to make a token as a keyword. Keyword
     /// aware <see cref="TokenStream"/>s can decide to modify a token
@@ -28,6 +30,9 @@ namespace Lucene.Net.Analysis.TokenAttri
     /// is modified. Stemming filters for instance can use this attribute
     /// to conditionally skip a term if <see cref="IsKeyword"/> returns <c>true</c>.
     /// </summary>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public interface IKeywordAttribute
     {
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IOffsetAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IOffsetAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IOffsetAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IOffsetAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -21,14 +21,14 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
+    using System.Diagnostics.CodeAnalysis;
 
     /// <summary>
     /// The start and end character offset of a <see cref="Token"/>
     /// </summary>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public interface IOffsetAttribute
     {
         /// <summary>
@@ -63,8 +63,8 @@ namespace Lucene.Net.Analysis.TokenAttri
         /// <summary>
         /// Sets the offset.
         /// </summary>
-        /// <param name="start">The start.</param>
-        /// <param name="end">The end.</param>
-        void SetOffset(int start, int end);
+        /// <param name="offsetStart">The start of the offset.</param>
+        /// <param name="offsetEnd">The end of the offset.</param>
+        void SetOffset(int offsetStart, int offsetEnd);
     }
 }

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPayloadAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPayloadAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPayloadAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPayloadAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -21,16 +21,16 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
+    using System.Diagnostics.CodeAnalysis;
     using Lucene.Net.Index;
 
     /// <summary>
     /// The payload of a <see cref="Token"/>.
     /// </summary>
     /// <seealso cref="Index.Payload" />
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public interface IPayloadAttribute
     {
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPositionIncrementAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPositionIncrementAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPositionIncrementAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/IPositionIncrementAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -23,10 +23,7 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
+    using System.Diagnostics.CodeAnalysis;
     using Lucene.Net.Index;
 
     /// <summary>
@@ -57,6 +54,9 @@ namespace Lucene.Net.Analysis.TokenAttri
     ///     </para>
     /// </remarks>
     /// <seealso cref="DocsAndPositionEnumerator"/>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public interface IPositionIncrementAttribute
     {
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -23,6 +23,7 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
+    using System.Diagnostics.CodeAnalysis;
     using Lucene.Net.Index;
     using Lucene.Net.Util;
 
@@ -54,6 +55,9 @@ namespace Lucene.Net.Analysis.TokenAttri
     ///         }
     ///     </code>
     /// </remarks>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public interface ITermToBytesRefAttribute
     {    
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITypeAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITypeAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITypeAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/ITypeAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -21,9 +21,14 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
+    using System.Diagnostics.CodeAnalysis;
+
     /// <summary>
     /// A <see cref="Token"/>'s lexical type. The default value is 'word'.
     /// </summary>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public interface ITypeAttribute
     {
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -21,10 +21,7 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
+    using System.Diagnostics.CodeAnalysis;
 
     /// <summary>
     /// The attribute that can be used to make a token as a keyword. Keyword
@@ -33,6 +30,9 @@ namespace Lucene.Net.Analysis.TokenAttri
     /// is modified. Stemming filters for instance can use this attribute
     /// to conditionally skip a term if <see cref="IsKeyword"/> returns <c>true</c>.
     /// </summary>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public class KeywordAttribute : Util.AttributeBase, IKeywordAttribute
     {
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -21,15 +21,15 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
+    using System.Diagnostics.CodeAnalysis;
     using Lucene.Net.Util;
 
     /// <summary>
     /// The start and end character offset of a <see cref="Token"/>.
     /// </summary>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public class OffsetAttribute : AttributeBase, IOffsetAttribute
     {
         /// <summary>
@@ -130,12 +130,12 @@ namespace Lucene.Net.Analysis.TokenAttri
         /// <summary>
         /// Sets the offset.
         /// </summary>
-        /// <param name="start">The start.</param>
-        /// <param name="end">The end.</param>
-        public void SetOffset(int start, int end)
+        /// <param name="offsetStart">The start of the offset.</param>
+        /// <param name="offsetEnd">The end of the offset.</param>
+        public void SetOffset(int offsetStart, int offsetEnd)
         {
-            this.OffsetStart = start;
-            this.OffsetEnd = end;
+            this.OffsetStart = offsetStart;
+            this.OffsetEnd = offsetEnd;
         }
     }
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -23,6 +23,7 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
+    using System.Diagnostics.CodeAnalysis;
     using Lucene.Net.Index;
     using Lucene.Net.Util;
 
@@ -30,6 +31,9 @@ namespace Lucene.Net.Analysis.TokenAttri
     /// The payload of a Token. 
     /// </summary>
     /// <seealso cref="Index.Payload"/>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public class PayloadAttribute : AttributeBase, IPayloadAttribute
     {
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -22,6 +22,7 @@
 namespace Lucene.Net.Analysis.TokenAttributes
 {
     using System;
+    using System.Diagnostics.CodeAnalysis;
     using Lucene.Net.Util;
 
     /// <summary>
@@ -52,6 +53,9 @@ namespace Lucene.Net.Analysis.TokenAttri
     ///     </para>
     /// </remarks>
     /// <seealso cref="Lucene.Net.Index.DocsAndPositionEnumerator"/>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public class PositionIncrementAttribute : AttributeBase, IPositionIncrementAttribute
     {
         private int positionIncrement = 1;

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs
Sat Aug 13 04:35:23 2011
@@ -21,15 +21,15 @@
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
+    using System.Diagnostics.CodeAnalysis;
     using Lucene.Net.Util;
 
     /// <summary>
     /// A <see cref="Token"/>'s lexical type. The default value is 'word'.
     /// </summary>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+        "its probably best to try to honor the correlating names when possible.")]
     public class TypeAttribute : AttributeBase, ITypeAttribute
     {
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenStream.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenStream.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenStream.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Analysis/TokenStream.cs Sat
Aug 13 04:35:23 2011
@@ -21,15 +21,14 @@
 
 namespace Lucene.Net.Analysis
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
+    using System.Diagnostics.CodeAnalysis;
     using Lucene.Net.Util;
 
     /// <summary>
     /// TODO: port
     /// </summary>
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+        Justification = "The name is valid even if it does not derived from Stream.")]
     public class TokenStream : AttributeSource 
     {
     }

Added: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Lucene.Net.idc
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Lucene.Net.idc?rev=1157316&view=auto
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Lucene.Net.idc (added)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Lucene.Net.idc Sat Aug 13 04:35:23
2011
@@ -0,0 +1 @@
+<Configurations active="Default"><Configuration name="Default"><GuestCommandRemote
val="project command through a shared folder"></GuestCommandRemote><ShareFoldersRemote
val=""></ShareFoldersRemote><RemoteDebugMonitor val="C:\Program Files (x86)\Microsoft
Visual Studio 10.0\Common7\IDE\Remote Debugger\x86\msvsmon.exe"></RemoteDebugMonitor><MonitorName
val="VMDebug"></MonitorName><RemoteVM val=""></RemoteVM><StartMode
val="No"></StartMode><TerminationModeRemote val="No operation"></TerminationModeRemote><CopyFilesRemote
val=""></CopyFilesRemote><PreRemoteCommandLine val=""></PreRemoteCommandLine><PostRemoteCommandLine
val=""></PostRemoteCommandLine><RecordingToReplay val=""></RecordingToReplay><ReplayVM
val=""></ReplayVM><BaseSnapshotForRecording val=""></BaseSnapshotForRecording><CopyFilesRecord
val=""></CopyFilesRecord><PreRecordCommandLine val=""></PreRecordCommandLine><PostRecordCommandLine
val=""></PostRecordCommandLine><TerminationModeRecord val="No operation"></Termina
 tionModeRecord><InstanceToDebug val=""></InstanceToDebug><GuestCommandReplay
val="project command through a shared folder"></GuestCommandReplay><ShareFoldersRecord
val=""></ShareFoldersRecord><RemoteReplayFlag val=""></RemoteReplayFlag><RemoteMachine
val=""></RemoteMachine><RemoteReplayVM val=""></RemoteReplayVM><RemoteRecordingToReplay
val=""></RemoteRecordingToReplay><RemoteReplayPasscode val=""></RemoteReplayPasscode><HostSearchPath
val=""></HostSearchPath></Configuration></Configurations>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/BytesRef.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/BytesRef.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/BytesRef.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/BytesRef.cs Sat Aug 13
04:35:23 2011
@@ -37,45 +37,45 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Implements the operator !=.
         /// </summary>
-        /// <param name="x">The x.</param>
-        /// <param name="y">The y.</param>
+        /// <param name="left">The x.</param>
+        /// <param name="right">The y.</param>
         /// <returns>The result of the operator.</returns>
-        public static bool operator !=(BytesRef x, BytesRef y)
+        public static bool operator !=(BytesRef left, BytesRef right)
         {
-            return x.reference != y.reference;
+            return left.reference != right.reference;
         }
 
         /// <summary>
         /// Implements the operator ==.
         /// </summary>
-        /// <param name="x">The x.</param>
-        /// <param name="y">The y.</param>
+        /// <param name="left">The x.</param>
+        /// <param name="right">The y.</param>
         /// <returns>The result of the operator.</returns>
-        public static bool operator ==(BytesRef x, BytesRef y)
+        public static bool operator ==(BytesRef left, BytesRef right)
         {
-            return x.reference == y.reference;
+            return left.reference == right.reference;
         }
 
         /// <summary>
         /// Implements the operator &lt;.
         /// </summary>
-        /// <param name="x">The x.</param>
-        /// <param name="y">The y.</param>
+        /// <param name="left">The x.</param>
+        /// <param name="right">The y.</param>
         /// <returns>The result of the operator.</returns>
-        public static bool operator <(BytesRef x, BytesRef y)
+        public static bool operator <(BytesRef left, BytesRef right)
         {
-            return x.reference.Length < y.reference.Length;
+            return left.reference.Length < right.reference.Length;
         }
 
         /// <summary>
         /// Implements the operator &gt;.
         /// </summary>
-        /// <param name="x">The x.</param>
-        /// <param name="y">The y.</param>
+        /// <param name="left">The x.</param>
+        /// <param name="right">The y.</param>
         /// <returns>The result of the operator.</returns>
-        public static bool operator >(BytesRef x, BytesRef y)
+        public static bool operator >(BytesRef left, BytesRef right)
         {
-            return x.reference.Length < y.reference.Length;
+            return left.reference.Length < right.reference.Length;
         }
 
         /// <summary>

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/IAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/IAttribute.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/IAttribute.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/IAttribute.cs Sat Aug
13 04:35:23 2011
@@ -50,6 +50,9 @@ namespace Lucene.Net.Util
     /// </remarks>
     [SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces",
         Justification = "This interface services as a way to query all interfaces that inherit
this one.")]
+    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix",
+           Justification = "The class was called Attribute in Java. It would be fun to call
it Annotation. However, " +
+           "its probably best to try to honor the correlating names when possible.")]
     public interface IAttribute
     {
     }

Modified: incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/RamUsageEstimator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/RamUsageEstimator.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/RamUsageEstimator.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/src/Lucene.Net/Util/RamUsageEstimator.cs Sat
Aug 13 04:35:23 2011
@@ -60,12 +60,12 @@ namespace Lucene.Net.Util
         /// The number of bytes for an object reference. This will either
         /// be 8 (64 bit) or 4 (32 bit).
         /// </summary>
-        public static readonly int NumBytesObjectRef = IntPtr.Size;
+        public static readonly int NumberOfBytesObjectRef = IntPtr.Size;
 
         /// <summary>
         /// The number of bytes for a char.
         /// </summary>
-        public const int NumBytesChar = 2;
+        public const int NumberOfBytesChar = 2;
 
         private string temp = string.Empty;
 

Modified: incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs?rev=1157316&r1=1157315&r2=1157316&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_4e/test/Lucene.Net.Test/Util/ArrayUtilTest.cs
Sat Aug 13 04:35:23 2011
@@ -82,7 +82,7 @@ namespace Lucene.Net.Util
 
             while (currentSize != int.MaxValue)
             {
-                int nextSize = ArrayUtil.Oversize(1 + currentSize, RamUsageEstimator.NumBytesObjectRef);
+                int nextSize = ArrayUtil.Oversize(1 + currentSize, RamUsageEstimator.NumberOfBytesObjectRef);
                 
                 Assert.IsTrue(nextSize > currentSize);
                 



Mime
View raw message