lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [3/5] lucenenet git commit: Lucene.Net.Analysis.Common.Analysis.Util (CharArrayMap + CharArraySet): Marked overloads of ContainsKey(), Get(), Put(), PutAll() and TryGetValue() that accept ushort, uint, ulong, and sbyte parameters as CLSCompliant(false)
Date Wed, 01 Feb 2017 12:49:28 GMT
Lucene.Net.Analysis.Common.Analysis.Util (CharArrayMap + CharArraySet): Marked overloads of
ContainsKey(), Get(), Put(), PutAll() and TryGetValue() that accept ushort, uint, ulong, and
sbyte parameters as CLSCompliant(false)


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

Branch: refs/heads/api-work
Commit: 19f22995cf955914017485350f67fb228af2cc51
Parents: deff177
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 1 18:29:25 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 1 18:47:36 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Util/CharArrayMap.cs               | 24 ++++++++++++++++++++
 .../Analysis/Util/CharArraySet.cs               | 12 ++++++++++
 2 files changed, 36 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/19f22995/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs
index 6124449..ac5edfa 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs
@@ -2187,6 +2187,7 @@ namespace Lucene.Net.Analysis.Util
         /// <c>true</c> if the <paramref name="key"/> <see cref="sbyte"/>
is in the <see cref="CharArrayMap{TValue}.KeySet"/>; 
         /// otherwise <c>false</c>
         /// </summary>
+        [CLSCompliant(false)]
         public static bool ContainsKey<TValue>(this CharArrayMap<TValue> map,
sbyte key)
         {
             return map.ContainsKey(key.ToString(CultureInfo.InvariantCulture));
@@ -2205,6 +2206,7 @@ namespace Lucene.Net.Analysis.Util
         /// <c>true</c> if the <paramref name="key"/> <see cref="uint"/>
is in the <see cref="CharArrayMap{TValue}.KeySet"/>; 
         /// otherwise <c>false</c>
         /// </summary>
+        [CLSCompliant(false)]
         public static bool ContainsKey<TValue>(this CharArrayMap<TValue> map,
uint key)
         {
             return map.ContainsKey(key.ToString(CultureInfo.InvariantCulture));
@@ -2214,6 +2216,7 @@ namespace Lucene.Net.Analysis.Util
         /// <c>true</c> if the <paramref name="key"/> <see cref="ulong"/>
is in the <see cref="CharArrayMap{TValue}.KeySet"/>; 
         /// otherwise <c>false</c>
         /// </summary>
+        [CLSCompliant(false)]
         public static bool ContainsKey<TValue>(this CharArrayMap<TValue> map,
ulong key)
         {
             return map.ContainsKey(key.ToString(CultureInfo.InvariantCulture));
@@ -2223,6 +2226,7 @@ namespace Lucene.Net.Analysis.Util
         /// <c>true</c> if the <paramref name="key"/> <see cref="ushort"/>
is in the <see cref="CharArrayMap{TValue}.KeySet"/>; 
         /// otherwise <c>false</c>
         /// </summary>
+        [CLSCompliant(false)]
         public static bool ContainsKey<TValue>(this CharArrayMap<TValue> map,
ushort key)
         {
             return map.ContainsKey(key.ToString(CultureInfo.InvariantCulture));
@@ -2299,6 +2303,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// returns the value of the mapping of the chars inside this <paramref name="text"/>
         /// </summary>
+        [CLSCompliant(false)]
         public static TValue Get<TValue>(this CharArrayMap<TValue> map, sbyte
text)
         {
             return map.Get(text.ToString(CultureInfo.InvariantCulture));
@@ -2315,6 +2320,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// returns the value of the mapping of the chars inside this <paramref name="text"/>
         /// </summary>
+        [CLSCompliant(false)]
         public static TValue Get<TValue>(this CharArrayMap<TValue> map, uint
text)
         {
             return map.Get(text.ToString(CultureInfo.InvariantCulture));
@@ -2323,6 +2329,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// returns the value of the mapping of the chars inside this <paramref name="text"/>
         /// </summary>
+        [CLSCompliant(false)]
         public static TValue Get<TValue>(this CharArrayMap<TValue> map, ulong
text)
         {
             return map.Get(text.ToString(CultureInfo.InvariantCulture));
@@ -2331,6 +2338,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// returns the value of the mapping of the chars inside this <paramref name="text"/>
         /// </summary>
+        [CLSCompliant(false)]
         public static TValue Get<TValue>(this CharArrayMap<TValue> map, ushort
text)
         {
             return map.Get(text.ToString(CultureInfo.InvariantCulture));
@@ -2407,6 +2415,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// Add the given mapping.
         /// </summary>
+        [CLSCompliant(false)]
         public static TValue Put<TValue>(this CharArrayMap<TValue> map, sbyte
text, TValue value)
         {
             return map.Put(text.ToString(CultureInfo.InvariantCulture), value);
@@ -2423,6 +2432,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// Add the given mapping.
         /// </summary>
+        [CLSCompliant(false)]
         public static TValue Put<TValue>(this CharArrayMap<TValue> map, uint
text, TValue value)
         {
             return map.Put(text.ToString(CultureInfo.InvariantCulture), value);
@@ -2431,6 +2441,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// Add the given mapping.
         /// </summary>
+        [CLSCompliant(false)]
         public static TValue Put<TValue>(this CharArrayMap<TValue> map, ulong
text, TValue value)
         {
             return map.Put(text.ToString(CultureInfo.InvariantCulture), value);
@@ -2439,6 +2450,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// Add the given mapping.
         /// </summary>
+        [CLSCompliant(false)]
         public static TValue Put<TValue>(this CharArrayMap<TValue> map, ushort
text, TValue value)
         {
             return map.Put(text.ToString(CultureInfo.InvariantCulture), value);
@@ -2557,6 +2569,7 @@ namespace Lucene.Net.Analysis.Util
         /// entries, and calls this map's <see cref="Put(string, TValue)"/> operation
once for each entry.
         /// </summary>
         /// <param name="collection">A dictionary of values to add/update in the current
map.</param>
+        [CLSCompliant(false)]
         public static void PutAll<TValue>(this CharArrayMap<TValue> map, IDictionary<sbyte,
TValue> collection)
         {
             foreach (var kvp in collection)
@@ -2583,6 +2596,7 @@ namespace Lucene.Net.Analysis.Util
         /// entries, and calls this map's <see cref="Put(string, TValue)"/> operation
once for each entry.
         /// </summary>
         /// <param name="collection">A dictionary of values to add/update in the current
map.</param>
+        [CLSCompliant(false)]
         public static void PutAll<TValue>(this CharArrayMap<TValue> map, IDictionary<uint,
TValue> collection)
         {
             foreach (var kvp in collection)
@@ -2596,6 +2610,7 @@ namespace Lucene.Net.Analysis.Util
         /// entries, and calls this map's <see cref="Put(string, TValue)"/> operation
once for each entry.
         /// </summary>
         /// <param name="collection">A dictionary of values to add/update in the current
map.</param>
+        [CLSCompliant(false)]
         public static void PutAll<TValue>(this CharArrayMap<TValue> map, IDictionary<ulong,
TValue> collection)
         {
             foreach (var kvp in collection)
@@ -2609,6 +2624,7 @@ namespace Lucene.Net.Analysis.Util
         /// entries, and calls this map's <see cref="Put(string, TValue)"/> operation
once for each entry.
         /// </summary>
         /// <param name="collection">A dictionary of values to add/update in the current
map.</param>
+        [CLSCompliant(false)]
         public static void PutAll<TValue>(this CharArrayMap<TValue> map, IDictionary<ushort,
TValue> collection)
         {
             foreach (var kvp in collection)
@@ -2727,6 +2743,7 @@ namespace Lucene.Net.Analysis.Util
         /// entries, and calls this map's <see cref="Put(string, TValue)"/> operation
once for each entry.
         /// </summary>
         /// <param name="collection">The values to add/update in the current map.</param>
+        [CLSCompliant(false)]
         public static void PutAll<TValue>(this CharArrayMap<TValue> map, IEnumerable<KeyValuePair<sbyte,
TValue>> collection)
         {
             foreach (var kvp in collection)
@@ -2753,6 +2770,7 @@ namespace Lucene.Net.Analysis.Util
         /// entries, and calls this map's <see cref="Put(string, TValue)"/> operation
once for each entry.
         /// </summary>
         /// <param name="collection">The values to add/update in the current map.</param>
+        [CLSCompliant(false)]
         public static void PutAll<TValue>(this CharArrayMap<TValue> map, IEnumerable<KeyValuePair<uint,
TValue>> collection)
         {
             foreach (var kvp in collection)
@@ -2766,6 +2784,7 @@ namespace Lucene.Net.Analysis.Util
         /// entries, and calls this map's <see cref="Put(string, TValue)"/> operation
once for each entry.
         /// </summary>
         /// <param name="collection">The values to add/update in the current map.</param>
+        [CLSCompliant(false)]
         public static void PutAll<TValue>(this CharArrayMap<TValue> map, IEnumerable<KeyValuePair<ulong,
TValue>> collection)
         {
             foreach (var kvp in collection)
@@ -2779,6 +2798,7 @@ namespace Lucene.Net.Analysis.Util
         /// entries, and calls this map's <see cref="Put(string, TValue)"/> operation
once for each entry.
         /// </summary>
         /// <param name="collection">The values to add/update in the current map.</param>
+        [CLSCompliant(false)]
         public static void PutAll<TValue>(this CharArrayMap<TValue> map, IEnumerable<KeyValuePair<ushort,
TValue>> collection)
         {
             foreach (var kvp in collection)
@@ -2903,6 +2923,7 @@ namespace Lucene.Net.Analysis.Util
         /// if the key is found; otherwise, the default value for the type of the value parameter.

         /// This parameter is passed uninitialized.</param>
         /// <returns><c>true</c> if the <see cref="CharArrayMap{TValue}"/>
contains an element with the specified key; otherwise, <c>false</c>.</returns>
+        [CLSCompliant(false)]
         public static bool TryGetValue<TValue>(this CharArrayMap<TValue> map,
sbyte key, out TValue value)
         {
             return map.TryGetValue(key.ToString(CultureInfo.InvariantCulture), out value);
@@ -2929,6 +2950,7 @@ namespace Lucene.Net.Analysis.Util
         /// if the key is found; otherwise, the default value for the type of the value parameter.

         /// This parameter is passed uninitialized.</param>
         /// <returns><c>true</c> if the <see cref="CharArrayMap{TValue}"/>
contains an element with the specified key; otherwise, <c>false</c>.</returns>
+        [CLSCompliant(false)]
         public static bool TryGetValue<TValue>(this CharArrayMap<TValue> map,
uint key, out TValue value)
         {
             return map.TryGetValue(key.ToString(CultureInfo.InvariantCulture), out value);
@@ -2942,6 +2964,7 @@ namespace Lucene.Net.Analysis.Util
         /// if the key is found; otherwise, the default value for the type of the value parameter.

         /// This parameter is passed uninitialized.</param>
         /// <returns><c>true</c> if the <see cref="CharArrayMap{TValue}"/>
contains an element with the specified key; otherwise, <c>false</c>.</returns>
+        [CLSCompliant(false)]
         public static bool TryGetValue<TValue>(this CharArrayMap<TValue> map,
ulong key, out TValue value)
         {
             return map.TryGetValue(key.ToString(CultureInfo.InvariantCulture), out value);
@@ -2955,6 +2978,7 @@ namespace Lucene.Net.Analysis.Util
         /// if the key is found; otherwise, the default value for the type of the value parameter.

         /// This parameter is passed uninitialized.</param>
         /// <returns><c>true</c> if the <see cref="CharArrayMap{TValue}"/>
contains an element with the specified key; otherwise, <c>false</c>.</returns>
+        [CLSCompliant(false)]
         public static bool TryGetValue<TValue>(this CharArrayMap<TValue> map,
ushort key, out TValue value)
         {
             return map.TryGetValue(key.ToString(CultureInfo.InvariantCulture), out value);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/19f22995/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArraySet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArraySet.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArraySet.cs
index d2fc5ee..b715768 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArraySet.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArraySet.cs
@@ -947,6 +947,7 @@ namespace Lucene.Net.Analysis.Util
         /// Add this <see cref="sbyte"/> into the set
         /// </summary>
         /// <returns><c>true</c> if <paramref name="o"/> was added
to the set; <c>false</c> if it already existed prior to this call</returns>
+        [CLSCompliant(false)]
         public static bool Add(this CharArraySet set, sbyte text)
         {
             return set.map.Put(text.ToString(CultureInfo.InvariantCulture));
@@ -965,6 +966,7 @@ namespace Lucene.Net.Analysis.Util
         /// Add this <see cref="uint"/> into the set
         /// </summary>
         /// <returns><c>true</c> if <paramref name="o"/> was added
to the set; <c>false</c> if it already existed prior to this call</returns>
+        [CLSCompliant(false)]
         public static bool Add(this CharArraySet set, uint text)
         {
             return set.map.Put(text.ToString(CultureInfo.InvariantCulture));
@@ -974,6 +976,7 @@ namespace Lucene.Net.Analysis.Util
         /// Add this <see cref="ulong"/> into the set
         /// </summary>
         /// <returns><c>true</c> if <paramref name="o"/> was added
to the set; <c>false</c> if it already existed prior to this call</returns>
+        [CLSCompliant(false)]
         public static bool Add(this CharArraySet set, ulong text)
         {
             return set.map.Put(text.ToString(CultureInfo.InvariantCulture));
@@ -983,6 +986,7 @@ namespace Lucene.Net.Analysis.Util
         /// Add this <see cref="ushort"/> into the set
         /// </summary>
         /// <returns><c>true</c> if <paramref name="o"/> was added
to the set; <c>false</c> if it already existed prior to this call</returns>
+        [CLSCompliant(false)]
         public static bool Add(this CharArraySet set, ushort text)
         {
             return set.map.Put(text.ToString(CultureInfo.InvariantCulture));
@@ -1059,6 +1063,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// <c>true</c> if the <see cref="sbyte"/> is in the set
         /// </summary>
+        [CLSCompliant(false)]
         public static bool Contains(this CharArraySet set, sbyte text)
         {
             return set.map.ContainsKey(text.ToString(CultureInfo.InvariantCulture));
@@ -1075,6 +1080,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// <c>true</c> if the <see cref="uint"/> is in the set
         /// </summary>
+        [CLSCompliant(false)]
         public static bool Contains(this CharArraySet set, uint text)
         {
             return set.map.ContainsKey(text.ToString(CultureInfo.InvariantCulture));
@@ -1083,6 +1089,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// <c>true</c> if the <see cref="ulong"/> is in the set
         /// </summary>
+        [CLSCompliant(false)]
         public static bool Contains(this CharArraySet set, ulong text)
         {
             return set.map.ContainsKey(text.ToString(CultureInfo.InvariantCulture));
@@ -1091,6 +1098,7 @@ namespace Lucene.Net.Analysis.Util
         /// <summary>
         /// <c>true</c> if the <see cref="ushort"/> is in the set
         /// </summary>
+        [CLSCompliant(false)]
         public static bool Contains(this CharArraySet set, ushort text)
         {
             return set.map.ContainsKey(text.ToString(CultureInfo.InvariantCulture));
@@ -1295,6 +1303,7 @@ namespace Lucene.Net.Analysis.Util
         /// </summary>
         /// <param name="other">The collection whose elements should be merged into
the <see cref="CharArraySet"/>.</param>
         /// <returns><c>true</c> if this <see cref="CharArraySet"/>
changed as a result of the call</returns>
+        [CLSCompliant(false)]
         public static bool UnionWith(this CharArraySet set, IEnumerable<sbyte> other)
         {
             if (other == null)
@@ -1349,6 +1358,7 @@ namespace Lucene.Net.Analysis.Util
         /// </summary>
         /// <param name="other">The collection whose elements should be merged into
the <see cref="CharArraySet"/>.</param>
         /// <returns><c>true</c> if this <see cref="CharArraySet"/>
changed as a result of the call</returns>
+        [CLSCompliant(false)]
         public static bool UnionWith(this CharArraySet set, IEnumerable<uint> other)
         {
             if (other == null)
@@ -1376,6 +1386,7 @@ namespace Lucene.Net.Analysis.Util
         /// </summary>
         /// <param name="other">The collection whose elements should be merged into
the <see cref="CharArraySet"/>.</param>
         /// <returns><c>true</c> if this <see cref="CharArraySet"/>
changed as a result of the call</returns>
+        [CLSCompliant(false)]
         public static bool UnionWith(this CharArraySet set, IEnumerable<ulong> other)
         {
             if (other == null)
@@ -1403,6 +1414,7 @@ namespace Lucene.Net.Analysis.Util
         /// </summary>
         /// <param name="other">The collection whose elements should be merged into
the <see cref="CharArraySet"/>.</param>
         /// <returns><c>true</c> if this <see cref="CharArraySet"/>
changed as a result of the call</returns>
+        [CLSCompliant(false)]
         public static bool UnionWith(this CharArraySet set, IEnumerable<ushort> other)
         {
             if (other == null)


Mime
View raw message