@@ -93,8 +93,10 @@ internal class RetrievableEntryHashSet<T> : ICollection<T>,
9393 {
9494 // store lower 31 bits of hash code
9595 private const int Lower31BitMask = 0x7FFFFFFF ;
96+ #if NEVER
9697 // cutoff point, above which we won't do stackallocs. This corresponds to 100 integers.
9798 private const int StackAllocThreshold = 100 ;
99+ #endif
98100 // when constructing a hashset from an existing collection, it may contain duplicates,
99101 // so this is used as the max acceptable excess ratio of capacity to count. Note that
100102 // this is only used on the ctor and not to automatically shrink if the hashset has, e.g,
@@ -121,7 +123,7 @@ internal class RetrievableEntryHashSet<T> : ICollection<T>,
121123 // temporary variable needed during deserialization
122124 private SerializationInfo _siInfo ;
123125
124- #region Constructors
126+ #region Constructors
125127
126128 public RetrievableEntryHashSet ( IEqualityComparer < string > comparer )
127129 {
@@ -204,7 +206,7 @@ protected RetrievableEntryHashSet(SerializationInfo info, StreamingContext conte
204206 _siInfo = info ;
205207 }
206208
207- #endregion
209+ #endregion
208210
209211 // Convenience to minimise change to callers used to dictionaries
210212 public ICollection < string > Keys
@@ -230,7 +232,7 @@ public ICollection<T> Values
230232 get { return this ; }
231233 }
232234
233- #region ICollection<T> methods
235+ #region ICollection<T> methods
234236
235237 // Convenience to minimise change to callers used to dictionaries
236238 internal T this [ string name ]
@@ -481,9 +483,9 @@ internal void MakeReadOnly()
481483 _readOnly = true ;
482484 }
483485
484- #endregion
486+ #endregion
485487
486- #region IEnumerable methods
488+ #region IEnumerable methods
487489
488490 public Enumerator GetEnumerator ( )
489491 {
@@ -508,9 +510,9 @@ IEnumerator IEnumerable.GetEnumerator()
508510 return new Enumerator ( this ) ;
509511 }
510512
511- #endregion
513+ #endregion
512514
513- #region ISerializable methods
515+ #region ISerializable methods
514516
515517 // [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
516518 [ SecurityCritical ]
@@ -533,9 +535,9 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte
533535 }
534536 }
535537
536- #endregion
538+ #endregion
537539
538- #region IDeserializationCallback methods
540+ #region IDeserializationCallback methods
539541
540542 public virtual void OnDeserialization ( Object sender )
541543 {
@@ -580,9 +582,9 @@ public virtual void OnDeserialization(Object sender)
580582 _siInfo = null ;
581583 }
582584
583- #endregion
585+ #endregion
584586
585- #region HashSet methods
587+ #region HashSet methods
586588
587589 /// <summary>
588590 /// Add item to this HashSet.
@@ -630,7 +632,7 @@ public void UnionWith(IEnumerable<T> other)
630632 }
631633 }
632634
633- #if NEVER
635+ #if NEVER
634636 /// <summary>
635637 /// Takes the intersection of this set with other. Modifies this set.
636638 ///
@@ -1152,9 +1154,9 @@ public static IEqualityComparer<RetrievableEntryHashSet<T>> CreateSetComparer()
11521154#endif
11531155#endif
11541156
1155- #endregion
1157+ #endregion
11561158
1157- #region Helper methods
1159+ #region Helper methods
11581160
11591161 /// <summary>
11601162 /// Initializes buckets and slots arrays. Uses suggested capacity by finding next prime
@@ -1723,7 +1725,7 @@ private int InternalGetHashCode(string item)
17231725 return _comparer . GetHashCode ( item ) & Lower31BitMask ;
17241726 }
17251727
1726- #endregion
1728+ #endregion
17271729
17281730 // used for set checking operations (using enumerables) that rely on counting
17291731 internal struct ElementCount
0 commit comments