lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [36/50] [abbrv] lucenenet git commit: Added SuppressMessage attribute from code analysis on every property that returns an array that also has [WritableArray] attribute
Date Tue, 31 Jan 2017 17:56:09 GMT
Added SuppressMessage attribute from code analysis on every property that returns an array that also has [WritableArray] attribute


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

Branch: refs/heads/api-work
Commit: 8a0f30be5b763b8faaeb8274fba42066e87506ff
Parents: 810f47c
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Tue Jan 31 18:41:03 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Tue Jan 31 18:41:03 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Compound/Hyphenation/ByteVector.cs     |  2 ++
 .../Analysis/Compound/Hyphenation/CharVector.cs     |  2 ++
 .../Analysis/Compound/Hyphenation/Hyphenation.cs    |  2 ++
 .../Analysis/En/PorterStemmer.cs                    |  2 ++
 .../Analysis/Synonym/SlowSynonymMap.cs              |  4 +++-
 .../Analysis/Util/CharArrayIterator.cs              |  2 ++
 .../Analysis/Util/CharacterUtils.cs                 |  3 ++-
 .../Analysis/Util/OpenStringBuilder.cs              |  2 ++
 .../Tartarus/Snowball/Among.cs                      |  6 ++----
 .../Tartarus/Snowball/SnowballProgram.cs            |  2 ++
 .../IntBlock/VariableIntBlockIndexInput.cs          |  2 ++
 .../Memory/DirectPostingsFormat.cs                  | 12 ++++++++++++
 .../Pulsing/PulsingPostingsReader.cs                |  3 +++
 .../Analysis/TokenAttributes/CharTermAttribute.cs   |  2 ++
 src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs  |  6 ++++++
 .../Codecs/MappingMultiDocsAndPositionsEnum.cs      |  2 ++
 src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs  |  2 ++
 src/Lucene.Net.Core/Index/MergeState.cs             |  4 ++++
 src/Lucene.Net.Core/Index/MultiDocValues.cs         |  5 +++++
 .../Index/MultiDocsAndPositionsEnum.cs              |  2 ++
 src/Lucene.Net.Core/Index/MultiDocsEnum.cs          |  2 ++
 src/Lucene.Net.Core/Index/MultiTermsEnum.cs         |  2 ++
 src/Lucene.Net.Core/Search/FieldDoc.cs              |  3 ++-
 .../Search/Spans/NearSpansOrdered.cs                |  2 ++
 .../Search/Spans/NearSpansUnordered.cs              |  2 ++
 src/Lucene.Net.Core/Search/TopDocs.cs               |  2 ++
 src/Lucene.Net.Core/Search/TopFieldDocs.cs          |  2 ++
 .../Support/WritableArrayAttribute.cs               | 16 +++++++++++-----
 .../Util/Automaton/CompiledAutomaton.cs             |  2 ++
 src/Lucene.Net.Core/Util/Automaton/State.cs         |  3 ++-
 src/Lucene.Net.Core/Util/ByteBlockPool.cs           |  3 +++
 src/Lucene.Net.Core/Util/BytesRef.cs                |  2 ++
 src/Lucene.Net.Core/Util/CharsRef.cs                |  2 ++
 src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs |  4 +++-
 src/Lucene.Net.Core/Util/Fst/Builder.cs             |  2 ++
 .../Util/GrowableByteArrayDataOutput.cs             |  2 ++
 src/Lucene.Net.Core/Util/IntBlockPool.cs            |  3 +++
 src/Lucene.Net.Core/Util/IntsRef.cs                 |  2 ++
 src/Lucene.Net.Core/Util/LongsRef.cs                |  2 ++
 src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs |  4 ++++
 src/Lucene.Net.Core/Util/RamUsageEstimator.cs       |  3 +++
 src/Lucene.Net.Core/Util/SentinelIntSet.cs          |  2 ++
 src/Lucene.Net.Expressions/Expression.cs            |  2 ++
 src/Lucene.Net.Join/TermsWithScoreCollector.cs      |  2 ++
 src/Lucene.Net.Queries/CustomScoreQuery.cs          |  2 ++
 src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs          |  2 ++
 src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs     |  2 ++
 src/Lucene.Net.Suggest/Spell/CombineSuggestion.cs   |  2 ++
 48 files changed, 132 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/ByteVector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/ByteVector.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/ByteVector.cs
index 8668cb9..7f00460 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/ByteVector.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/ByteVector.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Analysis.Compound.Hyphenation
 {
@@ -85,6 +86,7 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation
         }
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual sbyte[] Array
         {
             get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs
index 1b8bf41..c9f513b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/CharVector.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Support;
 using System;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Analysis.Compound.Hyphenation
 {
@@ -104,6 +105,7 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation
         }
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual char[] Array
         {
             get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/Hyphenation.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/Hyphenation.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/Hyphenation.cs
index 9c89d22..ec33fd0 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/Hyphenation.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/Hyphenation.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Analysis.Compound.Hyphenation
 {
@@ -45,6 +46,7 @@ namespace Lucene.Net.Analysis.Compound.Hyphenation
 
         /// <returns> the hyphenation points </returns>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual int[] HyphenationPoints
         {
             get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs
index 4dc232a..9c6fedd 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Analysis.En
 {
@@ -125,6 +126,7 @@ namespace Lucene.Net.Analysis.En
         /// to determine the length of the result.
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual char[] ResultBuffer
         {
             get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs
index 0adc9d4..5f3cff9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs
@@ -3,6 +3,7 @@ using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
 using System.Linq;
 using System.Text;
 
@@ -28,7 +29,7 @@ namespace Lucene.Net.Analysis.Synonym
     /// <summary>
     /// Mapping rules for use with <seealso cref="SlowSynonymFilter"/> </summary>
     /// @deprecated (3.4) use <seealso cref="SynonymFilterFactory"/> instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0 
-    [Obsolete("(3.4) use <seealso cref=\"SynonymFilterFactory\"/> instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0")]
+    [Obsolete("(3.4) use SynonymFilterFactory instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0")]
     internal class SlowSynonymMap
     {
         /// <summary>
@@ -42,6 +43,7 @@ namespace Lucene.Net.Analysis.Synonym
         /// <summary>
         /// @lucene.internal </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public Token[] Synonyms
         {
             get { return synonyms; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs
index f6acff8..9905f99 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Support;
 using System;
+using System.Diagnostics.CodeAnalysis;
 using Icu;
 
 namespace Lucene.Net.Analysis.Util
@@ -34,6 +35,7 @@ namespace Lucene.Net.Analysis.Util
         private int limit;
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual char[] Text
         {
             get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Analysis/Util/CharacterUtils.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharacterUtils.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharacterUtils.cs
index 00d9ea2..c4475a5 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharacterUtils.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharacterUtils.cs
@@ -1,5 +1,5 @@
 using System.Diagnostics;
-using System.IO;
+using System.Diagnostics.CodeAnalysis;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using Reader = System.IO.TextReader;
@@ -408,6 +408,7 @@ namespace Lucene.Net.Analysis.Util
             /// </summary>
             /// <returns> the buffer </returns>
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public char[] Buffer
             {
                 get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs
index 26d005f..c22b78d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Support;
 using System;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Analysis.Util
 {
@@ -59,6 +60,7 @@ namespace Lucene.Net.Analysis.Util
         }
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual char[] Array
         {
             get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/Among.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/Among.cs b/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/Among.cs
index c144194..72c49f4 100644
--- a/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/Among.cs
+++ b/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/Among.cs
@@ -31,11 +31,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 using Lucene.Net.Support;
 using System;
-using System.Collections.Generic;
-using System.Linq;
+using System.Diagnostics.CodeAnalysis;
 using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
 
 namespace Lucene.Net.Tartarus.Snowball
 {
@@ -86,6 +83,7 @@ namespace Lucene.Net.Tartarus.Snowball
 
         /// <summary>search string</summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public char[] S
         {
             get { return s; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/SnowballProgram.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/SnowballProgram.cs b/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/SnowballProgram.cs
index 62a841e..8204316 100644
--- a/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/SnowballProgram.cs
+++ b/src/Lucene.Net.Analysis.Common/Tartarus/Snowball/SnowballProgram.cs
@@ -32,6 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
+using System.Diagnostics.CodeAnalysis;
 using System.Reflection;
 using System.Text;
 
@@ -109,6 +110,7 @@ namespace Lucene.Net.Tartarus.Snowball
          * @see #getCurrentBufferLength()
          */
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public char[] CurrentBuffer
         {
             get { return m_current; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
index 6607801..b4cf3b8 100644
--- a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
@@ -2,6 +2,7 @@
 using Lucene.Net.Store;
 using Lucene.Net.Support;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Codecs.IntBlock
 {
@@ -85,6 +86,7 @@ namespace Lucene.Net.Codecs.IntBlock
             private readonly IndexInput input;
 
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public int[] Pending
             {
                 get { return pending; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index e6f1fce..43c1ba3 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -2,6 +2,7 @@
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Linq;
 
 namespace Lucene.Net.Codecs.Memory
@@ -191,6 +192,7 @@ namespace Lucene.Net.Codecs.Memory
             internal abstract class TermAndSkip
             {
                 [WritableArray]
+                [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                 public int[] Skips
                 {
                     get { return skips; }
@@ -206,6 +208,7 @@ namespace Lucene.Net.Codecs.Memory
             private sealed class LowFreqTerm : TermAndSkip
             {
                 [WritableArray]
+                [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                 public int[] Postings
                 {
                     get { return postings; }
@@ -213,6 +216,7 @@ namespace Lucene.Net.Codecs.Memory
                 private readonly int[] postings;
 
                 [WritableArray]
+                [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                 public byte[] Payloads
                 {
                     get { return payloads; }
@@ -256,6 +260,7 @@ namespace Lucene.Net.Codecs.Memory
                 private readonly long totalTermFreq;
 
                 [WritableArray]
+                [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                 public int[] DocIDs
                 {
                     get { return docIDs; }
@@ -263,6 +268,7 @@ namespace Lucene.Net.Codecs.Memory
                 private readonly int[] docIDs;
 
                 [WritableArray]
+                [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                 public int[] Freqs
                 {
                     get { return freqs; }
@@ -270,6 +276,7 @@ namespace Lucene.Net.Codecs.Memory
                 private readonly int[] freqs;
 
                 [WritableArray]
+                [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                 public int[][] Positions
                 {
                     get { return positions; }
@@ -277,6 +284,7 @@ namespace Lucene.Net.Codecs.Memory
                 private readonly int[][] positions;
 
                 [WritableArray]
+                [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                 public byte[][][] Payloads
                 {
                     get { return payloads; }
@@ -2325,12 +2333,14 @@ namespace Lucene.Net.Codecs.Memory
             }
 
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public int[] DocIDs
             {
                 get { return docIDs; }
             }
 
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public int[] Freqs
             {
                 get { return freqs; }
@@ -2520,12 +2530,14 @@ namespace Lucene.Net.Codecs.Memory
             }
 
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public int[] DocIDs
             {
                 get { return docIDs; }
             }
 
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public int[][] Positions
             {
                 get { return positions; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index b99d5cf..38f477b 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -5,6 +5,7 @@ using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Codecs.Pulsing
 {
@@ -97,8 +98,10 @@ namespace Lucene.Net.Codecs.Pulsing
         {
             internal bool Absolute { get; set; }
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             internal long[] Longs { get; set; }
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             internal byte[] Postings { get; set; }
             internal int PostingsSize { get; set; } // -1 if this term was not inlined
             internal BlockTermState WrappedTermState { get; set; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Analysis/TokenAttributes/CharTermAttribute.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Analysis/TokenAttributes/CharTermAttribute.cs b/src/Lucene.Net.Core/Analysis/TokenAttributes/CharTermAttribute.cs
index bc0f415..8b37993 100644
--- a/src/Lucene.Net.Core/Analysis/TokenAttributes/CharTermAttribute.cs
+++ b/src/Lucene.Net.Core/Analysis/TokenAttributes/CharTermAttribute.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Support;
 using System;
+using System.Diagnostics.CodeAnalysis;
 using System.Linq;
 using System.Text;
 
@@ -56,6 +57,7 @@ namespace Lucene.Net.Analysis.TokenAttributes
         }
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public char[] Buffer
         {
             get { return termBuffer; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs b/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
index 9955458..0a9fc2d 100644
--- a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
@@ -3,6 +3,7 @@ using Lucene.Net.Util.Fst;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 namespace Lucene.Net.Codecs
@@ -380,6 +381,7 @@ namespace Lucene.Net.Codecs
             /// <summary>
             /// Number of blocks at each prefix depth. </summary>
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public int[] BlockCountByPrefixLen
             {
                 get { return blockCountByPrefixLen; }
@@ -770,6 +772,7 @@ namespace Lucene.Net.Codecs
 
                     // metadata buffer, holding monotonic values
                     [WritableArray]
+                    [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                     public long[] Longs
                     {
                         get { return longs; }
@@ -779,6 +782,7 @@ namespace Lucene.Net.Codecs
 
                     // metadata buffer, holding general values
                     [WritableArray]
+                    [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                     public byte[] Bytes
                     {
                         get { return bytes; }
@@ -2747,6 +2751,7 @@ namespace Lucene.Net.Codecs
 
                     // metadata buffer, holding monotonic values
                     [WritableArray]
+                    [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                     public long[] Longs
                     {
                         get { return longs; }
@@ -2756,6 +2761,7 @@ namespace Lucene.Net.Codecs
 
                     // metadata buffer, holding general values
                     [WritableArray]
+                    [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
                     public byte[] Bytes
                     {
                         get { return bytes; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs b/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs
index 3335457..26f8edd 100644
--- a/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs
+++ b/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Codecs
 {
@@ -86,6 +87,7 @@ namespace Lucene.Net.Codecs
         /// <summary>
         /// Returns sub-readers we are merging. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public MultiDocsAndPositionsEnum.EnumWithSlice[] Subs
         {
             get { return subs; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs b/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs
index 79b18f4..b16b2ab 100644
--- a/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs
+++ b/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Support;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Codecs
 {
@@ -86,6 +87,7 @@ namespace Lucene.Net.Codecs
         /// <summary>
         /// Returns sub-readers we are merging. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public MultiDocsEnum.EnumWithSlice[] Subs
         {
             get { return subs; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Index/MergeState.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MergeState.cs b/src/Lucene.Net.Core/Index/MergeState.cs
index fb8213e..971a771 100644
--- a/src/Lucene.Net.Core/Index/MergeState.cs
+++ b/src/Lucene.Net.Core/Index/MergeState.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Index
 {
@@ -180,11 +181,13 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Maps docIDs around deletions. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public DocMap[] DocMaps { get; set; }
 
         /// <summary>
         /// New docID base per reader. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public int[] DocBase { get; set; }
 
         /// <summary>
@@ -206,6 +209,7 @@ namespace Lucene.Net.Index
         /// vectors may be bulk merged.
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public SegmentReader[] MatchingSegmentReaders { get; set; }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Index/MultiDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MultiDocValues.cs b/src/Lucene.Net.Core/Index/MultiDocValues.cs
index c7840af..bcd6fbc 100644
--- a/src/Lucene.Net.Core/Index/MultiDocValues.cs
+++ b/src/Lucene.Net.Core/Index/MultiDocValues.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Index
 {
@@ -572,6 +573,7 @@ namespace Lucene.Net.Index
             /// <summary>
             /// docbase for each leaf: parallel with <seealso cref="#values"/> </summary>
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public int[] DocStarts
             {
                 get { return docStarts; }
@@ -581,6 +583,7 @@ namespace Lucene.Net.Index
             /// <summary>
             /// leaf values </summary>
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public SortedDocValues[] Values
             {
                 get { return values; }
@@ -638,6 +641,7 @@ namespace Lucene.Net.Index
             /// <summary>
             /// docbase for each leaf: parallel with <seealso cref="#values"/> </summary>
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public int[] DocStarts
             {
                 get { return docStarts; }
@@ -647,6 +651,7 @@ namespace Lucene.Net.Index
             /// <summary>
             /// leaf values </summary>
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public SortedSetDocValues[] Values
             {
                 get { return values; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Index/MultiDocsAndPositionsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MultiDocsAndPositionsEnum.cs b/src/Lucene.Net.Core/Index/MultiDocsAndPositionsEnum.cs
index 0fecf8c..c2dbc0d 100644
--- a/src/Lucene.Net.Core/Index/MultiDocsAndPositionsEnum.cs
+++ b/src/Lucene.Net.Core/Index/MultiDocsAndPositionsEnum.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Support;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Index
 {
@@ -88,6 +89,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Returns sub-readers we are merging. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public EnumWithSlice[] Subs
         {
             get { return subs; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Index/MultiDocsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MultiDocsEnum.cs b/src/Lucene.Net.Core/Index/MultiDocsEnum.cs
index 2f357e9..a560c26 100644
--- a/src/Lucene.Net.Core/Index/MultiDocsEnum.cs
+++ b/src/Lucene.Net.Core/Index/MultiDocsEnum.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Support;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Index
 {
@@ -88,6 +89,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Returns sub-readers we are merging. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public EnumWithSlice[] Subs
         {
             get { return subs; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Index/MultiTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MultiTermsEnum.cs b/src/Lucene.Net.Core/Index/MultiTermsEnum.cs
index 2798686..1ecdc2d 100644
--- a/src/Lucene.Net.Core/Index/MultiTermsEnum.cs
+++ b/src/Lucene.Net.Core/Index/MultiTermsEnum.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Index
 {
@@ -76,6 +77,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// Returns sub-reader slices positioned to the current term. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public TermsEnumWithSlice[] MatchArray
         {
             get { return top; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Search/FieldDoc.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldDoc.cs b/src/Lucene.Net.Core/Search/FieldDoc.cs
index b162cde..6114322 100644
--- a/src/Lucene.Net.Core/Search/FieldDoc.cs
+++ b/src/Lucene.Net.Core/Search/FieldDoc.cs
@@ -1,5 +1,5 @@
 using Lucene.Net.Support;
-using System;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 namespace Lucene.Net.Search
@@ -50,6 +50,7 @@ namespace Lucene.Net.Search
         /// <seealso cref= Sort </seealso>
         /// <seealso cref= IndexSearcher#search(Query,Filter,int,Sort) </seealso>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public object[] Fields
         {
             get { return fields; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Search/Spans/NearSpansOrdered.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/NearSpansOrdered.cs b/src/Lucene.Net.Core/Search/Spans/NearSpansOrdered.cs
index e00e2a4..3906b3d 100644
--- a/src/Lucene.Net.Core/Search/Spans/NearSpansOrdered.cs
+++ b/src/Lucene.Net.Core/Search/Spans/NearSpansOrdered.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Search.Spans
 {
@@ -145,6 +146,7 @@ namespace Lucene.Net.Search.Spans
         }
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual Spans[] SubSpans
         {
             get { return subSpans; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Search/Spans/NearSpansUnordered.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/NearSpansUnordered.cs b/src/Lucene.Net.Core/Search/Spans/NearSpansUnordered.cs
index cdd6b5f..bba6210 100644
--- a/src/Lucene.Net.Core/Search/Spans/NearSpansUnordered.cs
+++ b/src/Lucene.Net.Core/Search/Spans/NearSpansUnordered.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Search.Spans
 {
@@ -180,6 +181,7 @@ namespace Lucene.Net.Search.Spans
         }
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual Spans[] SubSpans
         {
             get { return subSpans; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Search/TopDocs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/TopDocs.cs b/src/Lucene.Net.Core/Search/TopDocs.cs
index 1d28d74..6122d11 100644
--- a/src/Lucene.Net.Core/Search/TopDocs.cs
+++ b/src/Lucene.Net.Core/Search/TopDocs.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Search
 {
@@ -35,6 +36,7 @@ namespace Lucene.Net.Search
         /// <summary>
         /// The top hits for the query. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public ScoreDoc[] ScoreDocs { get; set; }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Search/TopFieldDocs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/TopFieldDocs.cs b/src/Lucene.Net.Core/Search/TopFieldDocs.cs
index bfad474..fbd2a99 100644
--- a/src/Lucene.Net.Core/Search/TopFieldDocs.cs
+++ b/src/Lucene.Net.Core/Search/TopFieldDocs.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Search
 {
@@ -28,6 +29,7 @@ namespace Lucene.Net.Search
         /// <summary>
         /// The fields which were used to sort results by. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public SortField[] Fields { get; set; }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Support/WritableArrayAttribute.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/WritableArrayAttribute.cs b/src/Lucene.Net.Core/Support/WritableArrayAttribute.cs
index 6a5ae91..698b2ae 100644
--- a/src/Lucene.Net.Core/Support/WritableArrayAttribute.cs
+++ b/src/Lucene.Net.Core/Support/WritableArrayAttribute.cs
@@ -3,16 +3,22 @@
 namespace Lucene.Net.Support
 {
     /// <summary>
-    /// Attribute to define a property as a writable array.
-    /// Per MSDN, properties should never return arrays because arrays
+    /// Attribute to define a property or method as a writable array.
+    /// Per MSDN, members should never return arrays because the array contents
     /// can be updated, which makes the behavior confusing. However,
     /// Lucene's design sometimes relies on other classes to update arrays -
     /// both as array fields and as methods that return arrays. So, in these
     /// cases we are making an exception to this rule and marking them with
-    /// [WritableArray] to signify that this is intentional.
+    /// <see cref="WritableArrayAttribute"/> to signify that this is intentional.
+    /// <para/>
+    /// For properties that violate this rule, you should also use
+    /// the <see cref="System.Diagnostics.CodeAnalysis.SuppressMessageAttribute"/>:
+    /// <code>
+    /// [WritableArray, SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
+    /// </code>
     /// </summary>
-    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false)]
-    public class WritableArrayAttribute : Attribute
+    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false)]
+    public class WritableArrayAttribute : Attribute 
     {
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs b/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs
index f85f748..bd60de4 100644
--- a/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs
+++ b/src/Lucene.Net.Core/Util/Automaton/CompiledAutomaton.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 namespace Lucene.Net.Util.Automaton
@@ -87,6 +88,7 @@ namespace Lucene.Net.Util.Automaton
         /// Only valid for <seealso cref="AUTOMATON_TYPE#NORMAL"/>.
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public Transition[][] SortedTransitions
         {
             get { return sortedTransitions; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/Automaton/State.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Automaton/State.cs b/src/Lucene.Net.Core/Util/Automaton/State.cs
index 9dbd101..75d432a 100644
--- a/src/Lucene.Net.Core/Util/Automaton/State.cs
+++ b/src/Lucene.Net.Core/Util/Automaton/State.cs
@@ -2,7 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 /*
@@ -45,6 +45,7 @@ namespace Lucene.Net.Util.Automaton
     {
         internal bool accept;
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public Transition[] TransitionsArray
         {
             get { return transitionsArray; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/ByteBlockPool.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/ByteBlockPool.cs b/src/Lucene.Net.Core/Util/ByteBlockPool.cs
index d51f9e8..5a1f0ae 100644
--- a/src/Lucene.Net.Core/Util/ByteBlockPool.cs
+++ b/src/Lucene.Net.Core/Util/ByteBlockPool.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Linq;
 
 namespace Lucene.Net.Util
@@ -135,6 +136,7 @@ namespace Lucene.Net.Util
         /// needed don't modify this outside of this class.
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public byte[][] Buffers
         {
             get { return buffers; }
@@ -154,6 +156,7 @@ namespace Lucene.Net.Util
         /// Current head buffer
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public byte[] Buffer
         {
             get { return buffer; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/BytesRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/BytesRef.cs b/src/Lucene.Net.Core/Util/BytesRef.cs
index ee1a704..38cdc88 100644
--- a/src/Lucene.Net.Core/Util/BytesRef.cs
+++ b/src/Lucene.Net.Core/Util/BytesRef.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 namespace Lucene.Net.Util
@@ -45,6 +46,7 @@ namespace Lucene.Net.Util
         /// The contents of the BytesRef. Should never be {@code null}.
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public byte[] Bytes
         {
             get { return bytes; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/CharsRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/CharsRef.cs b/src/Lucene.Net.Core/Util/CharsRef.cs
index 45c4b45..c727a30 100644
--- a/src/Lucene.Net.Core/Util/CharsRef.cs
+++ b/src/Lucene.Net.Core/Util/CharsRef.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Util
 {
@@ -38,6 +39,7 @@ namespace Lucene.Net.Util
         /// The contents of the CharsRef. Should never be {@code null}.
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public char[] Chars
         {
             get { return chars; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs b/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
index d10e16f..57f1dcf 100644
--- a/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
+++ b/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Search;
 using Lucene.Net.Support;
 using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
 using System.Linq;
 using System.Text;
 
@@ -403,7 +404,8 @@ namespace Lucene.Net.Util
             /// <summary>
             /// CacheEntry objects which suggest a problem
             /// </summary>
-            [WritableArray] // LUCENENET NOTE: In Lucene, this method allows writing to the array, although it probably doesn't make sense to do this.
+            [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public FieldCache.CacheEntry[] CacheEntries
             {
                 get { return entries; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/Fst/Builder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/Builder.cs b/src/Lucene.Net.Core/Util/Fst/Builder.cs
index 5ad2ed7..39adf42 100644
--- a/src/Lucene.Net.Core/Util/Fst/Builder.cs
+++ b/src/Lucene.Net.Core/Util/Fst/Builder.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Util.Fst
 {
@@ -648,6 +649,7 @@ namespace Lucene.Net.Util.Fst
             public int NumArcs { get; set; }
 
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public Arc<S>[] Arcs { get; set; }
 
             // TODO: instead of recording isFinal/output on the

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs b/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs
index 6a7d0e6..208a14c 100644
--- a/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs
+++ b/src/Lucene.Net.Core/Util/GrowableByteArrayDataOutput.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Util
 {
@@ -30,6 +31,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// The bytes </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public byte[] Bytes
         {
             get { return bytes; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/IntBlockPool.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/IntBlockPool.cs b/src/Lucene.Net.Core/Util/IntBlockPool.cs
index 2bc018e..7b0ec79 100644
--- a/src/Lucene.Net.Core/Util/IntBlockPool.cs
+++ b/src/Lucene.Net.Core/Util/IntBlockPool.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Util
 {
@@ -72,6 +73,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// array of buffers currently used in the pool. Buffers are allocated if needed don't modify this outside of this class </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public int[][] Buffers
         {
             get { return buffers; }
@@ -90,6 +92,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// Current head buffer </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public int[] Buffer
         {
             get { return buffer; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/IntsRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/IntsRef.cs b/src/Lucene.Net.Core/Util/IntsRef.cs
index a48b6ae..67c50d8 100644
--- a/src/Lucene.Net.Core/Util/IntsRef.cs
+++ b/src/Lucene.Net.Core/Util/IntsRef.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 namespace Lucene.Net.Util
@@ -38,6 +39,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// The contents of the IntsRef. Should never be {@code null}. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public int[] Ints
         {
             get { return ints; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/LongsRef.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/LongsRef.cs b/src/Lucene.Net.Core/Util/LongsRef.cs
index 0947820..2a1fa1e 100644
--- a/src/Lucene.Net.Core/Util/LongsRef.cs
+++ b/src/Lucene.Net.Core/Util/LongsRef.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 namespace Lucene.Net.Util
@@ -38,6 +39,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// The contents of the LongsRef. Should never be {@code null}. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public long[] Longs
         {
             get { return longs; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs b/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs
index 7e3b679..cdf6231 100644
--- a/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs
+++ b/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 namespace Lucene.Net.Util.Packed
@@ -314,6 +315,7 @@ namespace Lucene.Net.Util.Packed
         /// <summary>
         /// Expert. The low bits. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual long[] LowerBits
         {
             get { return lowerLongs; }
@@ -322,6 +324,7 @@ namespace Lucene.Net.Util.Packed
         /// <summary>
         /// Expert. The high bits. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual long[] UpperBits
         {
             get { return upperLongs; }
@@ -330,6 +333,7 @@ namespace Lucene.Net.Util.Packed
         /// <summary>
         /// Expert. The index bits. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual long[] IndexBits
         {
             get { return upperZeroBitPositionIndex; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/RamUsageEstimator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/RamUsageEstimator.cs b/src/Lucene.Net.Core/Util/RamUsageEstimator.cs
index b618489..0faeba0 100644
--- a/src/Lucene.Net.Core/Util/RamUsageEstimator.cs
+++ b/src/Lucene.Net.Core/Util/RamUsageEstimator.cs
@@ -2,6 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Globalization;
 using System.Reflection;
 using System.Runtime.CompilerServices;
@@ -237,6 +238,7 @@ namespace Lucene.Net.Util
             public long AlignedShallowInstanceSize { get; private set; }
 
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public FieldInfo[] ReferenceFields { get; private set; }
 
             public ClassCache(long alignedShallowInstanceSize, FieldInfo[] referenceFields)
@@ -656,6 +658,7 @@ namespace Lucene.Net.Util
             /// All of set entries. Always of power of two length.
             /// </summary>
             [WritableArray]
+            [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
             public object[] Keys
             {
                 get { return keys; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Core/Util/SentinelIntSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/SentinelIntSet.cs b/src/Lucene.Net.Core/Util/SentinelIntSet.cs
index 5f00904..e7a9a0b 100644
--- a/src/Lucene.Net.Core/Util/SentinelIntSet.cs
+++ b/src/Lucene.Net.Core/Util/SentinelIntSet.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Util
 {
@@ -44,6 +45,7 @@ namespace Lucene.Net.Util
         /// <summary>
         /// A power-of-2 over-sized array holding the integers in the set along with empty values. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public int[] Keys
         {
             get { return keys; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Expressions/Expression.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/Expression.cs b/src/Lucene.Net.Expressions/Expression.cs
index 502aadc..3a62902 100644
--- a/src/Lucene.Net.Expressions/Expression.cs
+++ b/src/Lucene.Net.Expressions/Expression.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
 using Lucene.Net.Support;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Expressions
 {
@@ -48,6 +49,7 @@ namespace Lucene.Net.Expressions
 
         /// <summary>Named variables referred to by this expression</summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public string[] Variables { get; private set; }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Join/TermsWithScoreCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/TermsWithScoreCollector.cs b/src/Lucene.Net.Join/TermsWithScoreCollector.cs
index 5b94d5f..be2c943 100644
--- a/src/Lucene.Net.Join/TermsWithScoreCollector.cs
+++ b/src/Lucene.Net.Join/TermsWithScoreCollector.cs
@@ -3,6 +3,7 @@ using Lucene.Net.Search;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Join
 {
@@ -49,6 +50,7 @@ namespace Lucene.Net.Join
         }
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual float[] ScoresPerTerm
         {
             get

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Queries/CustomScoreQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/CustomScoreQuery.cs b/src/Lucene.Net.Queries/CustomScoreQuery.cs
index 6ff1e8c..2fef745 100644
--- a/src/Lucene.Net.Queries/CustomScoreQuery.cs
+++ b/src/Lucene.Net.Queries/CustomScoreQuery.cs
@@ -4,6 +4,7 @@ using Lucene.Net.Search;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
 namespace Lucene.Net.Queries
@@ -432,6 +433,7 @@ namespace Lucene.Net.Queries
         /// <summary>
         /// The scoring queries that only affect the score of <see cref="CustomScoreQuery"/>. </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual Query[] ScoringQueries
         {
             get { return scoringQueries; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs b/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs
index 8ccbd1f..a4dda6a 100644
--- a/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs
+++ b/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs
@@ -7,6 +7,7 @@ using Lucene.Net.Search.Similarities;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
 using System.IO;
 using System.Linq;
 using System.Text;
@@ -306,6 +307,7 @@ namespace Lucene.Net.Queries.Mlt
         /// provided in the constructor.
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public string[] FieldNames { get; set; }
 
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs b/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs
index a0c9746..0aaa4de 100644
--- a/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs
+++ b/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs
@@ -6,6 +6,7 @@ using Lucene.Net.Index;
 using Lucene.Net.Search;
 using Lucene.Net.Support;
 using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
 using System.IO;
 
 namespace Lucene.Net.Queries.Mlt
@@ -114,6 +115,7 @@ namespace Lucene.Net.Queries.Mlt
         }
 
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public virtual string[] MoreLikeFields
         {
             get { return moreLikeFields; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8a0f30be/src/Lucene.Net.Suggest/Spell/CombineSuggestion.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Spell/CombineSuggestion.cs b/src/Lucene.Net.Suggest/Spell/CombineSuggestion.cs
index fcc0e01..737adab 100644
--- a/src/Lucene.Net.Suggest/Spell/CombineSuggestion.cs
+++ b/src/Lucene.Net.Suggest/Spell/CombineSuggestion.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System.Diagnostics.CodeAnalysis;
 
 namespace Lucene.Net.Search.Spell
 {
@@ -42,6 +43,7 @@ namespace Lucene.Net.Search.Spell
         /// The indexes from the passed-in array of terms used to make this word combination
         /// </summary>
         [WritableArray]
+        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
         public int[] OriginalTermIndexes
         {
             get { return originalTermIndexes; }


Mime
View raw message