Permalink
Browse files

Reformatted.

SVN: trunk@2660
  • Loading branch information...
1 parent 5e71e83 commit 2d2b09be7481ac7401710bdf221636e8e046a689 Sergey Koshcheyev committed Feb 23, 2007
Showing with 4,956 additions and 5,512 deletions.
  1. +14 −15 src/Iesi.Collections.Test/Generic/HashedSetFixture.cs
  2. +3 −5 src/Iesi.Collections.Test/Generic/ImmutableSetFixture.cs
  3. +21 −24 src/Iesi.Collections.Test/Generic/SetFixture.cs
  4. +18 −18 src/Iesi.Collections.Test/Generic/SortedSetFixture.cs
  5. +16 −18 src/Iesi.Collections.Test/HashedSetFixture.cs
  6. +2 −6 src/Iesi.Collections.Test/HybridSetFixture.cs
  7. +2 −4 src/Iesi.Collections.Test/ListSetFixture.cs
  8. +192 −199 src/Iesi.Collections.Test/SetFixture.cs
  9. +20 −23 src/Iesi.Collections.Test/SortedSetFixture.cs
  10. +19 −19 src/Iesi.Collections/DictionarySet.cs
  11. +20 −21 src/Iesi.Collections/Generic/DictionarySet.cs
  12. +3 −2 src/Iesi.Collections/Generic/HashedSet.cs
  13. +3 −2 src/Iesi.Collections/Generic/ISet.cs
  14. +40 −48 src/Iesi.Collections/Generic/ImmutableSet.cs
  15. +37 −35 src/Iesi.Collections/Generic/Set.cs
  16. +7 −5 src/Iesi.Collections/Generic/SortedSet.cs
  17. +40 −38 src/Iesi.Collections/Generic/SynchronizedSet.cs
  18. +2 −3 src/Iesi.Collections/HashedSet.cs
  19. +2 −2 src/Iesi.Collections/HybridSet.cs
  20. +4 −4 src/Iesi.Collections/ISet.cs
  21. +34 −38 src/Iesi.Collections/ImmutableSet.cs
  22. +2 −2 src/Iesi.Collections/ListSet.cs
  23. +38 −40 src/Iesi.Collections/Set.cs
  24. +5 −6 src/Iesi.Collections/SortedSet.cs
  25. +36 −38 src/Iesi.Collections/SynchronizedSet.cs
  26. +13 −15 src/NHibernate.Caches.MemCache.Tests/AssemblyInfo.cs
  27. +60 −54 src/NHibernate.Caches.MemCache.Tests/MemCacheFixture.cs
  28. +19 −14 src/NHibernate.Caches.MemCache.Tests/MemCacheProviderFixture.cs
  29. +13 −10 src/NHibernate.Caches.MemCache.Tests/MemCacheSectionHandlerFixture.cs
  30. +195 −191 src/NHibernate.Caches.MemCache/MemCacheClient.cs
  31. +6 −4 src/NHibernate.Caches.MemCache/MemCacheConfig.cs
  32. +74 −69 src/NHibernate.Caches.MemCache/MemCacheProvider.cs
  33. +19 −15 src/NHibernate.Caches.MemCache/MemCacheSectionHandler.cs
  34. +59 −53 src/NHibernate.Caches.Prevalence.Tests/PrevalenceCacheFixture.cs
  35. +20 −14 src/NHibernate.Caches.Prevalence.Tests/PrevalenceCacheProviderFixture.cs
  36. +12 −11 src/NHibernate.Caches.Prevalence/CacheSystem.cs
  37. +47 −45 src/NHibernate.Caches.Prevalence/PrevalenceCache.cs
  38. +47 −45 src/NHibernate.Caches.Prevalence/PrevalenceCacheProvider.cs
  39. +107 −102 src/NHibernate.Caches.SysCache.Tests/SysCacheFixture.cs
  40. +19 −13 src/NHibernate.Caches.SysCache.Tests/SysCacheProviderFixture.cs
  41. +13 −10 src/NHibernate.Caches.SysCache.Tests/SysCacheSectionHandlerFixture.cs
  42. +3 −3 src/NHibernate.Caches.SysCache/CacheConfig.cs
  43. +322 −321 src/NHibernate.Caches.SysCache/SysCache.cs
  44. +28 −24 src/NHibernate.Caches.SysCache/SysCacheProvider.cs
  45. +13 −13 src/NHibernate.Caches.SysCache/SysCacheSectionHandler.cs
  46. +79 −77 src/NHibernate.DomainModel/A.cs
  47. +6 −5 src/NHibernate.DomainModel/Abstract.cs
  48. +5 −12 src/NHibernate.DomainModel/AbstractProxy.cs
  49. +3 −3 src/NHibernate.DomainModel/Assignable.cs
  50. +75 −72 src/NHibernate.DomainModel/B.cs
  51. +11 −12 src/NHibernate.DomainModel/Bar.cs
  52. +5 −21 src/NHibernate.DomainModel/BarProxy.cs
  53. +4 −4 src/NHibernate.DomainModel/BasicNameable.cs
  54. +163 −363 src/NHibernate.DomainModel/Baz.cs
  55. +1 −3 src/NHibernate.DomainModel/Blobber.cs
  56. +4 −4 src/NHibernate.DomainModel/Broken.cs
  57. +18 −14 src/NHibernate.DomainModel/C1.cs
  58. +7 −3 src/NHibernate.DomainModel/C2.cs
  59. +4 −5 src/NHibernate.DomainModel/Category.cs
  60. +3 −4 src/NHibernate.DomainModel/Child.cs
  61. +4 −4 src/NHibernate.DomainModel/Circular.cs
  62. +1 −1 src/NHibernate.DomainModel/Component.cs
  63. +8 −25 src/NHibernate.DomainModel/ComponentCollection.cs
  64. +1 −1 src/NHibernate.DomainModel/Componentizable.cs
  65. +57 −57 src/NHibernate.DomainModel/CompositeElement.cs
  66. +9 −8 src/NHibernate.DomainModel/Contained.cs
  67. +18 −18 src/NHibernate.DomainModel/Container.cs
  68. +6 −7 src/NHibernate.DomainModel/Custom.cs
  69. +46 −44 src/NHibernate.DomainModel/CustomPersister.cs
  70. +65 −64 src/NHibernate.DomainModel/D.cs
  71. +15 −14 src/NHibernate.DomainModel/Detail.cs
  72. +36 −47 src/NHibernate.DomainModel/DoubleStringType.cs
  73. +1 −1 src/NHibernate.DomainModel/Down.cs
  74. +4 −3 src/NHibernate.DomainModel/E.cs
  75. +2 −1 src/NHibernate.DomainModel/Eye.cs
  76. +14 −12 src/NHibernate.DomainModel/Fee.cs
  77. +2 −1 src/NHibernate.DomainModel/Fixed.cs
  78. +5 −3 src/NHibernate.DomainModel/Fo.cs
  79. +86 −79 src/NHibernate.DomainModel/Foo.cs
  80. +33 −32 src/NHibernate.DomainModel/FooComponent.cs
  81. +42 −135 src/NHibernate.DomainModel/FooProxy.cs
  82. +2 −2 src/NHibernate.DomainModel/FooStatus.cs
  83. +45 −41 src/NHibernate.DomainModel/Fum.cs
  84. +8 −8 src/NHibernate.DomainModel/FumCompositeID.cs
  85. +7 −7 src/NHibernate.DomainModel/Fumm.cs
  86. +11 −11 src/NHibernate.DomainModel/Glarch.cs
  87. +21 −70 src/NHibernate.DomainModel/GlarchProxy.cs
  88. +8 −6 src/NHibernate.DomainModel/Holder.cs
  89. +3 −3 src/NHibernate.DomainModel/INameable.cs
  90. +1 −1 src/NHibernate.DomainModel/INamed.cs
  91. +7 −7 src/NHibernate.DomainModel/Immutable.cs
  92. +9 −9 src/NHibernate.DomainModel/Inner.cs
  93. +9 −11 src/NHibernate.DomainModel/InnerKey.cs
  94. +3 −3 src/NHibernate.DomainModel/Jay.cs
  95. +12 −12 src/NHibernate.DomainModel/Location.cs
  96. +6 −5 src/NHibernate.DomainModel/Lower.cs
  97. +7 −6 src/NHibernate.DomainModel/M.cs
  98. +4 −4 src/NHibernate.DomainModel/Many.cs
  99. +28 −27 src/NHibernate.DomainModel/Master.cs
  100. +8 −9 src/NHibernate.DomainModel/Middle.cs
  101. +13 −14 src/NHibernate.DomainModel/MiddleKey.cs
  102. +9 −9 src/NHibernate.DomainModel/MoreStuff.cs
  103. +10 −10 src/NHibernate.DomainModel/Multi.cs
  104. +0 −1 src/NHibernate.DomainModel/Multiplicity.cs
  105. +45 −36 src/NHibernate.DomainModel/MultiplicityType.cs
  106. +1 −1 src/NHibernate.DomainModel/N.cs
  107. +19 −20 src/NHibernate.DomainModel/NHSpecific/AuditComponent.cs
  108. +56 −55 src/NHibernate.DomainModel/NHSpecific/BasicClass.cs
  109. +7 −12 src/NHibernate.DomainModel/NHSpecific/BasicObject.cs
  110. +15 −18 src/NHibernate.DomainModel/NHSpecific/BasicSerializable.cs
  111. +1 −2 src/NHibernate.DomainModel/NHSpecific/BasicTime.cs
  112. +65 −52 src/NHibernate.DomainModel/NHSpecific/Child.cs
  113. +3 −6 src/NHibernate.DomainModel/NHSpecific/ClassWithNullColumns.cs
  114. +98 −97 src/NHibernate.DomainModel/NHSpecific/GetSetHelper.cs
  115. +1 −1 src/NHibernate.DomainModel/NHSpecific/InvalidProxyClass.cs
  116. +12 −10 src/NHibernate.DomainModel/NHSpecific/LazyLoadBug.cs
  117. +18 −18 src/NHibernate.DomainModel/NHSpecific/Node.cs
  118. +13 −20 src/NHibernate.DomainModel/NHSpecific/NullInt32UserType.cs
  119. +21 −18 src/NHibernate.DomainModel/NHSpecific/NullableInt32.cs
  120. +21 −17 src/NHibernate.DomainModel/NHSpecific/NullableInt32Converter.cs
  121. +12 −12 src/NHibernate.DomainModel/NHSpecific/NullableInt32Type.cs
  122. +11 −12 src/NHibernate.DomainModel/NHSpecific/NullableTypesType.cs
  123. +2 −2 src/NHibernate.DomainModel/NHSpecific/Optimistic.cs
  124. +20 −20 src/NHibernate.DomainModel/NHSpecific/Parent.cs
  125. +13 −12 src/NHibernate.DomainModel/NHSpecific/ParentComparer.cs
  126. +11 −14 src/NHibernate.DomainModel/NHSpecific/SexType.cs
  127. +13 −14 src/NHibernate.DomainModel/NHSpecific/SimpleComponent.cs
  128. +12 −13 src/NHibernate.DomainModel/NHSpecific/Team.cs
  129. +7 −8 src/NHibernate.DomainModel/NHSpecific/UnsavedType.cs
  130. +1 −2 src/NHibernate.DomainModel/NestingComponent.cs
  131. +13 −6 src/NHibernate.DomainModel/NotMono.cs
  132. +8 −7 src/NHibernate.DomainModel/One.cs
  133. +8 −9 src/NHibernate.DomainModel/Outer.cs
  134. +11 −12 src/NHibernate.DomainModel/OuterKey.cs
  135. +2 −3 src/NHibernate.DomainModel/Parent.cs
  136. +4 −2 src/NHibernate.DomainModel/Part.cs
  137. +12 −13 src/NHibernate.DomainModel/Po.cs
  138. +36 −31 src/NHibernate.DomainModel/Qux.cs
  139. +6 −9 src/NHibernate.DomainModel/Result.cs
  140. +2 −9 src/NHibernate.DomainModel/ReverseComparator.cs
  141. +3 −5 src/NHibernate.DomainModel/S.cs
  142. +7 −10 src/NHibernate.DomainModel/Several.cs
  143. +19 −16 src/NHibernate.DomainModel/Simple.cs
  144. +7 −7 src/NHibernate.DomainModel/Single.cs
  145. +60 −71 src/NHibernate.DomainModel/Sortable.cs
  146. +5 −5 src/NHibernate.DomainModel/StringComparator.cs
  147. +7 −8 src/NHibernate.DomainModel/Stuff.cs
  148. +1 −1 src/NHibernate.DomainModel/SubComponent.cs
  149. +3 −5 src/NHibernate.DomainModel/SubDetail.cs
  150. +3 −4 src/NHibernate.DomainModel/SubMulti.cs
  151. +2 −1 src/NHibernate.DomainModel/Super.cs
  152. +18 −15 src/NHibernate.DomainModel/Top.cs
  153. +1 −2 src/NHibernate.DomainModel/Trivial.cs
  154. +2 −2 src/NHibernate.DomainModel/TrivialClass.cs
  155. +4 −4 src/NHibernate.DomainModel/Up.cs
  156. +9 −10 src/NHibernate.DomainModel/Vetoer.cs
  157. +8 −8 src/NHibernate.DomainModel/W.cs
  158. +4 −5 src/NHibernate.DomainModel/X.cs
  159. +4 −5 src/NHibernate.DomainModel/Y.cs
  160. +4 −5 src/NHibernate.DomainModel/Z.cs
  161. +3 −7 src/NHibernate.Examples/AssemblyInfo.cs
  162. +8 −27 src/NHibernate.Examples/Blogger/Blog.cs
  163. +13 −42 src/NHibernate.Examples/Blogger/BlogItem.cs
  164. +41 −45 src/NHibernate.Examples/Blogger/BloggerFixture.cs
  165. +7 −7 src/NHibernate.Examples/Cascades/Alias.cs
  166. +16 −18 src/NHibernate.Examples/Cascades/CascadeFixture.cs
  167. +6 −8 src/NHibernate.Examples/Cascades/Child.cs
  168. +21 −20 src/NHibernate.Examples/Cascades/Parent.cs
  169. +4 −5 src/NHibernate.Examples/ForumQuestions/OfferExample/Offer.cs
  170. +18 −26 src/NHibernate.Examples/ForumQuestions/OfferExample/OfferExample.cs
  171. +4 −4 src/NHibernate.Examples/ForumQuestions/OfferExample/OfferType.cs
  172. +4 −4 src/NHibernate.Examples/ForumQuestions/T1078029/Member.cs
  173. +4 −6 src/NHibernate.Examples/ForumQuestions/T1078029/MemberFixture.cs
  174. +3 −4 src/NHibernate.Examples/ForumQuestions/T1104613/A.cs
  175. +4 −5 src/NHibernate.Examples/ForumQuestions/T1104613/AOuterJoin.cs
  176. +14 −16 src/NHibernate.Examples/ForumQuestions/T1104613/OuterJoinFixture.cs
  177. +12 −14 src/NHibernate.Examples/ForumQuestions/TestCase.cs
  178. +6 −7 src/NHibernate.Examples/QuickStart/User.cs
  179. +6 −8 src/NHibernate.Examples/QuickStart/UserFixture.cs
  180. +18 −17 src/NHibernate.JetDriver/JetCaseFragment.cs
  181. +19 −19 src/NHibernate.JetDriver/JetDbCommand.cs
  182. +9 −9 src/NHibernate.JetDriver/JetDbConnection.cs
  183. +2 −2 src/NHibernate.JetDriver/JetDbTransaction.cs
  184. +45 −43 src/NHibernate.JetDriver/JetDialect.cs
  185. +6 −4 src/NHibernate.JetDriver/JetDriver.cs
  186. +5 −3 src/NHibernate.JetDriver/JetJoinFragment.cs
  187. +691 −819 src/NHibernate.Mapping.Attributes.Test/DomainModel.cs
  188. +35 −28 src/NHibernate.Mapping.Attributes.Test/SerializationFixture.cs
  189. +35 −33 src/NHibernate.Tasks/Hbm2DdlTask.cs
  190. +12 −12 src/NHibernate.Tasks/Hbm2NetTask.cs
  191. +32 −30 src/NHibernate.Test.Performance/ConfigPerformanceTest.cs
  192. +22 −24 src/NHibernate.Test.Performance/NewPerformanceTest.cs
  193. +107 −113 src/NHibernate.Test.Performance/NewerPerformanceTest.cs
  194. +136 −144 src/NHibernate.Test.Performance/PerformanceTest.cs
  195. +2 −2 src/NHibernate.Tool.hbm2net.Console/Bootstrap.cs
  196. +5 −5 src/NHibernate.Tool.hbm2net.Tests/ClassNameTests.cs
  197. +3 −3 src/NHibernate.Tool.hbm2net.Tests/ResourceHelper.cs
  198. +32 −33 src/NHibernate.Tool.hbm2net.Tests/SimpleMappingFileConfigFileNoOutputArgsTests.cs
  199. +18 −14 src/NHibernate.Tool.hbm2net.Tests/SimpleMappingFileNoConfigNoOutputArgsTests.cs
  200. +5 −10 src/NHibernate.Tool.hbm2net.Tests/TestHelper.cs
  201. +9 −14 src/NHibernate.Tool.hbm2net/AbstractRenderer.cs
Sorry, we could not display the entire diff because it was too big.
View
29 src/Iesi.Collections.Test/Generic/HashedSetFixture.cs
@@ -2,8 +2,9 @@
using System;
using System.Collections.Generic;
-
-using Iesi.Collections.Generic;
+using System.IO;
+using System.Runtime.Serialization;
+using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework;
@@ -15,7 +16,6 @@ namespace Iesi.Collections.Generic.Test
[TestFixture]
public class HashedSetFixture : GenericSetFixture
{
-
protected override ISet<string> CreateInstance()
{
return new HashedSet<string>();
@@ -32,24 +32,23 @@ protected override Type ExpectedType
}
[Test]
- public void Serialization()
+ public void Serialization()
{
// serialize and then deserialize the ISet.
- System.IO.Stream stream = new System.IO.MemoryStream();
- System.Runtime.Serialization.IFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
- formatter.Serialize( stream, _set );
+ Stream stream = new MemoryStream();
+ IFormatter formatter = new BinaryFormatter();
+ formatter.Serialize(stream, _set);
stream.Position = 0;
- ISet<string> desSet = (ISet<string>)formatter.Deserialize(stream);
+ ISet<string> desSet = (ISet<string>) formatter.Deserialize(stream);
stream.Close();
- Assert.AreEqual( 3, desSet.Count, "should have des 3 items" );
- Assert.IsTrue( desSet.Contains( one ), "should contain one" );
- Assert.IsTrue( desSet.Contains( two ), "should contain two" );
- Assert.IsTrue( desSet.Contains( three ), "should contain three" );
+ Assert.AreEqual(3, desSet.Count, "should have des 3 items");
+ Assert.IsTrue(desSet.Contains(one), "should contain one");
+ Assert.IsTrue(desSet.Contains(two), "should contain two");
+ Assert.IsTrue(desSet.Contains(three), "should contain three");
}
-
-
}
}
-#endif
+
+#endif
View
8 src/Iesi.Collections.Test/Generic/ImmutableSetFixture.cs
@@ -3,8 +3,6 @@
using System;
using System.Collections.Generic;
-using Iesi.Collections.Generic;
-
using NUnit.Framework;
namespace Iesi.Collections.Generic.Test
@@ -15,7 +13,6 @@ namespace Iesi.Collections.Generic.Test
[TestFixture]
public class ImmutableSetFixture : GenericSetFixture
{
-
protected override ISet<string> CreateInstance()
{
return new ImmutableSet<string>(new HashedSet<string>());
@@ -29,7 +26,8 @@ protected override ISet<string> CreateInstance(ICollection<string> init)
protected override Type ExpectedType
{
get { return typeof(ImmutableSet<string>); }
- }
+ }
}
}
-#endif
+
+#endif
View
45 src/Iesi.Collections.Test/Generic/SetFixture.cs
@@ -3,8 +3,6 @@
using System;
using System.Collections.Generic;
-using Iesi.Collections.Generic;
-
using NUnit.Framework;
namespace Iesi.Collections.Generic.Test
@@ -36,15 +34,15 @@ public virtual void SetUp()
_bInitValues.Add("three");
_bInitValues.Add("four");
- _set = CreateInstance(new string[] { one, two, three });
+ _set = CreateInstance(new string[] {one, two, three});
}
#region System.IClonable Member Tests
[Test]
public void Clone()
{
- ISet<string> clonedSet = (ISet<string>)_set.Clone();
+ ISet<string> clonedSet = (ISet<string>) _set.Clone();
Assert.AreEqual(ExpectedType, clonedSet.GetType(), "cloned set should be the same type");
Assert.AreEqual(_set.Count, clonedSet.Count, "set and cloned version should be same");
@@ -54,7 +52,7 @@ public void Clone()
clonedSet.Add("not in original");
Assert.IsFalse(_set.Count == clonedSet.Count, "adding to clone should not add to original.");
if (clonedSet.IsReadOnly)
- Assert.Fail("Read-only set can be modified");
+ Assert.Fail("Read-only set can be modified");
}
catch (NotSupportedException)
{
@@ -77,7 +75,7 @@ public void CopyTo()
{
string[] dest = new string[3];
_set.CopyTo(dest, 0);
-
+
int count = 0;
foreach (string obj in dest)
@@ -164,7 +162,7 @@ public void AddAll()
catch (NotSupportedException)
{
if (!_set.IsReadOnly)
- throw;
+ throw;
}
}
@@ -177,12 +175,12 @@ public void Clear()
Assert.AreEqual(0, _set.Count, "should have no items in ISet.");
if (_set.IsReadOnly)
- Assert.Fail("Read-only set can be modified");
+ Assert.Fail("Read-only set can be modified");
}
catch (NotSupportedException)
{
if (!_set.IsReadOnly)
- throw;
+ throw;
}
}
@@ -234,7 +232,7 @@ public void ExclusiveOr()
Assert.AreEqual(null, bothNull, "two null sets return null set");
}
- [Test]
+ [Test]
public void Intersect()
{
ISet<string> a = CreateInstance(_aInitValues);
@@ -303,12 +301,12 @@ public void Remove()
Assert.IsFalse(_set.Remove(one), "was already removed.");
if (_set.IsReadOnly)
- Assert.Fail("Read-only set can be modified");
+ Assert.Fail("Read-only set can be modified");
}
catch (NotSupportedException)
{
if (!_set.IsReadOnly)
- throw;
+ throw;
}
}
@@ -327,10 +325,10 @@ public void RemoveAll()
if (_set.IsReadOnly)
Assert.Fail("Read-only set can be modified");
}
- catch (NotSupportedException)
+ catch (NotSupportedException)
{
if (!_set.IsReadOnly)
- throw;
+ throw;
}
}
@@ -387,16 +385,17 @@ public void Union()
Assert.AreEqual(null, bothNull, "two nulls intersect as null");
}
- #endregion
+ #endregion
#region Iesi.Collection.ISet<string> Operator Tests
+
[Test]
public void ExclusiveOrOperator()
{
ISet<string> a = CreateInstance(_aInitValues);
ISet<string> b = CreateInstance(_bInitValues);
- ISet<string> ab = (Set<string>)a ^ (Set<string>)b;
+ ISet<string> ab = (Set<string>) a ^ (Set<string>) b;
Assert.AreEqual(3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'");
Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
@@ -413,7 +412,7 @@ public void IntersectOperator()
ISet<string> a = CreateInstance(_aInitValues);
ISet<string> b = CreateInstance(_bInitValues);
- ISet<string> ab = (Set<string>)a & (Set<string>)b;
+ ISet<string> ab = (Set<string>) a & (Set<string>) b;
Assert.AreEqual(2, ab.Count, "contains 2 elements - 'two', and 'three'");
Assert.IsTrue(ab.Contains("two"), "should contain 'two'");
@@ -426,15 +425,14 @@ public void MinusOperator()
ISet<string> a = CreateInstance(_aInitValues);
ISet<string> b = CreateInstance(_bInitValues);
- ISet<string> ab = (Set<string>)a - (Set<string>)b;
+ ISet<string> ab = (Set<string>) a - (Set<string>) b;
Assert.AreEqual(2, ab.Count, "contains 2 elements - 'zero', and 'one'");
Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
-
}
[Test]
@@ -443,7 +441,7 @@ public void UnionOperator()
ISet<string> a = CreateInstance(_aInitValues);
ISet<string> b = CreateInstance(_bInitValues);
- ISet<string> ab = (Set<string>)a | (Set<string>)b;
+ ISet<string> ab = (Set<string>) a | (Set<string>) b;
Assert.AreEqual(5, ab.Count, "contains 5 elements - 'zero' through 'four'");
Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
@@ -454,17 +452,16 @@ public void UnionOperator()
Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
-
}
-
#endregion
protected abstract ISet<string> CreateInstance();
protected abstract ISet<string> CreateInstance(ICollection<string> init);
- protected abstract System.Type ExpectedType { get; }
+ protected abstract Type ExpectedType { get; }
}
}
-#endif
+
+#endif
View
36 src/Iesi.Collections.Test/Generic/SortedSetFixture.cs
@@ -1,10 +1,9 @@
#if NET_2_0
using System;
+using System.Collections;
using System.Collections.Generic;
-using Iesi.Collections.Generic;
-
using NUnit.Framework;
namespace Iesi.Collections.Generic.Test
@@ -13,7 +12,7 @@ namespace Iesi.Collections.Generic.Test
/// Summary description for SortedSetFixture.
/// </summary>
[TestFixture]
- public class SortedSetFixture : GenericSetFixture
+ public class SortedSetFixture : GenericSetFixture
{
protected override ISet<string> CreateInstance()
{
@@ -31,29 +30,29 @@ protected override Type ExpectedType
}
[Test]
- public void OrderedEnumeration()
+ public void OrderedEnumeration()
{
List<string> expectedOrder = new List<string>(3);
- expectedOrder.Add( one );
- expectedOrder.Add( two );
- expectedOrder.Add( three );
- expectedOrder.Sort( );
+ expectedOrder.Add(one);
+ expectedOrder.Add(two);
+ expectedOrder.Add(three);
+ expectedOrder.Sort();
int index = 0;
- foreach( string str in _set )
+ foreach (string str in _set)
{
- Assert.AreEqual( str, expectedOrder[index], index.ToString() + " did not have same value" );
+ Assert.AreEqual(str, expectedOrder[index], index.ToString() + " did not have same value");
index++;
}
}
[Test]
- public void OrderedCaseInsensitiveEnumeration()
+ public void OrderedCaseInsensitiveEnumeration()
{
- System.Collections.ArrayList expectedOrder = new System.Collections.ArrayList(3);
- expectedOrder.Add( "ONE" );
- expectedOrder.Add( "two" );
- expectedOrder.Add( "tHree" );
+ ArrayList expectedOrder = new ArrayList(3);
+ expectedOrder.Add("ONE");
+ expectedOrder.Add("two");
+ expectedOrder.Add("tHree");
SortedSet<string> theSet = new SortedSet<string>(StringComparer.CurrentCultureIgnoreCase);
foreach (string str in expectedOrder)
@@ -62,12 +61,13 @@ public void OrderedCaseInsensitiveEnumeration()
expectedOrder.Sort(StringComparer.CurrentCultureIgnoreCase);
int index = 0;
- foreach( string str in theSet )
+ foreach (string str in theSet)
{
- Assert.AreEqual( str, expectedOrder[index], index.ToString() + " did not have same value" );
+ Assert.AreEqual(str, expectedOrder[index], index.ToString() + " did not have same value");
index++;
}
}
}
}
-#endif
+
+#endif
View
34 src/Iesi.Collections.Test/HashedSetFixture.cs
@@ -1,7 +1,8 @@
using System;
using System.Collections;
-
-using Iesi.Collections;
+using System.IO;
+using System.Runtime.Serialization;
+using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework;
@@ -13,15 +14,14 @@ namespace Iesi.Collections.Test
[TestFixture]
public class HashedSetFixture : SetFixture
{
-
protected override ISet CreateInstance()
{
return new HashedSet();
}
-
+
protected override ISet CreateInstance(ICollection init)
{
- return new HashedSet( init );
+ return new HashedSet(init);
}
protected override Type ExpectedType
@@ -30,23 +30,21 @@ protected override Type ExpectedType
}
[Test]
- public void Serialization()
+ public void Serialization()
{
// serialize and then deserialize the ISet.
- System.IO.Stream stream = new System.IO.MemoryStream();
- System.Runtime.Serialization.IFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
- formatter.Serialize( stream, _set );
+ Stream stream = new MemoryStream();
+ IFormatter formatter = new BinaryFormatter();
+ formatter.Serialize(stream, _set);
stream.Position = 0;
-
- ISet desSet = (ISet)formatter.Deserialize( stream );
+
+ ISet desSet = (ISet) formatter.Deserialize(stream);
stream.Close();
- Assert.AreEqual( 3, desSet.Count, "should have des 3 items" );
- Assert.IsTrue( desSet.Contains( one ), "should contain one" );
- Assert.IsTrue( desSet.Contains( two ), "should contain two" );
- Assert.IsTrue( desSet.Contains( three ), "should contain three" );
+ Assert.AreEqual(3, desSet.Count, "should have des 3 items");
+ Assert.IsTrue(desSet.Contains(one), "should contain one");
+ Assert.IsTrue(desSet.Contains(two), "should contain two");
+ Assert.IsTrue(desSet.Contains(three), "should contain three");
}
-
-
}
-}
+}
View
8 src/Iesi.Collections.Test/HybridSetFixture.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections;
-using Iesi.Collections;
-
using NUnit.Framework;
namespace Iesi.Collections.Test
@@ -13,21 +11,19 @@ namespace Iesi.Collections.Test
[TestFixture]
public class HybridSetFixture : SetFixture
{
-
protected override ISet CreateInstance()
{
return new HybridSet();
}
protected override ISet CreateInstance(ICollection init)
{
- return new HybridSet( init );
+ return new HybridSet(init);
}
protected override Type ExpectedType
{
get { return typeof(HybridSet); }
}
-
}
-}
+}
View
6 src/Iesi.Collections.Test/ListSetFixture.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections;
-using Iesi.Collections;
-
using NUnit.Framework;
namespace Iesi.Collections.Test
@@ -20,12 +18,12 @@ protected override ISet CreateInstance()
protected override ISet CreateInstance(ICollection init)
{
- return new ListSet( init );
+ return new ListSet(init);
}
protected override Type ExpectedType
{
get { return typeof(ListSet); }
}
}
-}
+}
View
391 src/Iesi.Collections.Test/SetFixture.cs
@@ -1,16 +1,14 @@
using System;
using System.Collections;
-using Iesi.Collections;
-
using NUnit.Framework;
namespace Iesi.Collections.Test
{
/// <summary>
/// Summary description for SetFixture.
/// </summary>
- public abstract class SetFixture
+ public abstract class SetFixture
{
private IList _aInitValues;
private IList _bInitValues;
@@ -24,379 +22,374 @@ public abstract class SetFixture
public virtual void SetUp()
{
_aInitValues = new ArrayList();
- _aInitValues.Add( "zero" );
- _aInitValues.Add( "one" );
- _aInitValues.Add( "two" );
- _aInitValues.Add( "three" );
+ _aInitValues.Add("zero");
+ _aInitValues.Add("one");
+ _aInitValues.Add("two");
+ _aInitValues.Add("three");
_bInitValues = new ArrayList();
- _bInitValues.Add( "two" );
- _bInitValues.Add( "three" );
- _bInitValues.Add( "four" );
+ _bInitValues.Add("two");
+ _bInitValues.Add("three");
+ _bInitValues.Add("four");
_set = CreateInstance();
- _set.Add( one );
- _set.Add( two );
- _set.Add( three );
+ _set.Add(one);
+ _set.Add(two);
+ _set.Add(three);
}
#region System.IClonable Member Tests
[Test]
- public void Clone()
+ public void Clone()
{
- ISet clonedSet = (ISet)_set.Clone();
-
- Assert.AreEqual( ExpectedType, clonedSet.GetType(), "cloned set should be the same type" );
- Assert.AreEqual( _set.Count, clonedSet.Count, "set and cloned version should be same" );
+ ISet clonedSet = (ISet) _set.Clone();
+
+ Assert.AreEqual(ExpectedType, clonedSet.GetType(), "cloned set should be the same type");
+ Assert.AreEqual(_set.Count, clonedSet.Count, "set and cloned version should be same");
- clonedSet.Add( "not in original" );
- Assert.IsFalse( _set.Count==clonedSet.Count, "adding to clone should not add to original." );
+ clonedSet.Add("not in original");
+ Assert.IsFalse(_set.Count == clonedSet.Count, "adding to clone should not add to original.");
- foreach( object obj in _set )
+ foreach (object obj in _set)
{
- Assert.IsTrue( clonedSet.Contains( obj ), "cloned set should have same objects as original set." );
+ Assert.IsTrue(clonedSet.Contains(obj), "cloned set should have same objects as original set.");
}
}
#endregion
#region System.Collections.ICollection Member Tests
-
+
[Test]
- public void CopyTo()
+ public void CopyTo()
{
object[] dest = new object[3];
- _set.CopyTo( dest, 0 );
+ _set.CopyTo(dest, 0);
int count = 0;
- foreach( object obj in dest )
+ foreach (object obj in dest)
{
- Assert.IsTrue( _set.Contains( obj ), "set should contain the object in the array" );
+ Assert.IsTrue(_set.Contains(obj), "set should contain the object in the array");
count++;
}
- Assert.AreEqual( 3, count, "should have 3 items in array" );
+ Assert.AreEqual(3, count, "should have 3 items in array");
}
[Test]
- public void Count()
+ public void Count()
{
- Assert.AreEqual( 3, _set.Count, "should be 3 items" );
- Assert.AreEqual( 0, CreateInstance().Count, "new set should have nothing in it." );
+ Assert.AreEqual(3, _set.Count, "should be 3 items");
+ Assert.AreEqual(0, CreateInstance().Count, "new set should have nothing in it.");
}
#endregion
#region Iesi.Collections.ISet Constructor Tests
[Test]
- public void CtorWithDefaults()
+ public void CtorWithDefaults()
{
ArrayList init = new ArrayList(3);
- init.Add( "one" );
- init.Add( "two" );
- init.Add( "three" );
+ init.Add("one");
+ init.Add("two");
+ init.Add("three");
- ISet theSet = CreateInstance( init );
+ ISet theSet = CreateInstance(init);
- Assert.AreEqual( 3, init.Count, "3 items in set" );
+ Assert.AreEqual(3, init.Count, "3 items in set");
int index = 0;
- foreach( object obj in init )
+ foreach (object obj in init)
{
- Assert.IsTrue( theSet.Contains( obj ), "set should contain obj at index = " + index.ToString() );
+ Assert.IsTrue(theSet.Contains(obj), "set should contain obj at index = " + index.ToString());
index++;
}
}
#endregion
#region Iesi.Collections.ISet Member Tests
-
+
[Test]
- public void Add()
+ public void Add()
{
- Assert.IsTrue( _set.Add( "four" ), "should have added 'four'" );
- Assert.AreEqual( 4, _set.Count, "should have added 'four'" );
+ Assert.IsTrue(_set.Add("four"), "should have added 'four'");
+ Assert.AreEqual(4, _set.Count, "should have added 'four'");
- Assert.IsFalse( _set.Add( two ), "'two' was already there" );
- Assert.AreEqual( 4, _set.Count, "object already in set" );
+ Assert.IsFalse(_set.Add(two), "'two' was already there");
+ Assert.AreEqual(4, _set.Count, "object already in set");
}
[Test]
- public void AddAll()
+ public void AddAll()
{
ArrayList addAll = new ArrayList(3);
- addAll.Add( "four" );
- addAll.Add( "five" );
- addAll.Add( "four" );
-
- Assert.IsTrue( _set.AddAll( addAll ), "should have modified set" );
- Assert.AreEqual( 5, _set.Count, "should have added one 'four' and 'five'" );
+ addAll.Add("four");
+ addAll.Add("five");
+ addAll.Add("four");
- Assert.IsFalse( _set.AddAll( addAll ), "all elements already in set" );
+ Assert.IsTrue(_set.AddAll(addAll), "should have modified set");
+ Assert.AreEqual(5, _set.Count, "should have added one 'four' and 'five'");
+ Assert.IsFalse(_set.AddAll(addAll), "all elements already in set");
}
[Test]
- public void Clear()
+ public void Clear()
{
_set.Clear();
- Assert.AreEqual( 0, _set.Count, "should have no items in ISet." );
+ Assert.AreEqual(0, _set.Count, "should have no items in ISet.");
}
[Test]
- public void Contains()
+ public void Contains()
{
- Assert.IsTrue( _set.Contains( one ), "does contain one" );
- Assert.IsFalse( _set.Contains( "four" ), "does not contain 'four'" );
+ Assert.IsTrue(_set.Contains(one), "does contain one");
+ Assert.IsFalse(_set.Contains("four"), "does not contain 'four'");
}
[Test]
- public void ContainsAll()
+ public void ContainsAll()
{
ArrayList all = new ArrayList(2);
- all.Add( "one" );
- all.Add( "two" );
+ all.Add("one");
+ all.Add("two");
- Assert.IsTrue( _set.ContainsAll( all ), "should contain 'one' and 'two'" );
+ Assert.IsTrue(_set.ContainsAll(all), "should contain 'one' and 'two'");
- all.Add( "not in there" );
- Assert.IsFalse( _set.ContainsAll( all ), "should not contain the just added 'not in there'" );
+ all.Add("not in there");
+ Assert.IsFalse(_set.ContainsAll(all), "should not contain the just added 'not in there'");
}
[Test]
- public void ExclusiveOr()
+ public void ExclusiveOr()
{
- ISet a = CreateInstance( _aInitValues );
- ISet b = CreateInstance( _bInitValues );
+ ISet a = CreateInstance(_aInitValues);
+ ISet b = CreateInstance(_bInitValues);
+
+ ISet ab = Set.ExclusiveOr(a, b);
- ISet ab = Set.ExclusiveOr( a, b );
+ Assert.AreEqual(3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'");
+ Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
+ Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
+ Assert.IsTrue(ab.Contains("four"), "should contain 'four'");
- Assert.AreEqual( 3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'" );
- Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" );
- Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" );
- Assert.IsTrue( ab.Contains( "four" ), "should contain 'four'" );
+ Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
+ Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
- Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" );
- Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" );
+ ISet aNull = Set.ExclusiveOr(a, null);
+ Assert.AreEqual(_aInitValues.Count, aNull.Count, "count still same");
+ Assert.IsTrue(aNull.ContainsAll(_aInitValues), "all A elements kept");
- ISet aNull = Set.ExclusiveOr( a, null );
- Assert.AreEqual( _aInitValues.Count, aNull.Count, "count still same" );
- Assert.IsTrue( aNull.ContainsAll( _aInitValues ), "all A elements kept" );
-
- ISet bNull = Set.ExclusiveOr( null, b );
- Assert.AreEqual( _bInitValues.Count, bNull.Count, "count still same" );
- Assert.IsTrue( bNull.ContainsAll( _bInitValues ), "all B elements kept" );
+ ISet bNull = Set.ExclusiveOr(null, b);
+ Assert.AreEqual(_bInitValues.Count, bNull.Count, "count still same");
+ Assert.IsTrue(bNull.ContainsAll(_bInitValues), "all B elements kept");
- ISet bothNull = Set.ExclusiveOr( null, null );
- Assert.AreEqual( null, bothNull, "two null sets return null set" );
+ ISet bothNull = Set.ExclusiveOr(null, null);
+ Assert.AreEqual(null, bothNull, "two null sets return null set");
}
[Test]
- public void Intersect()
+ public void Intersect()
{
- ISet a = CreateInstance( _aInitValues );
- ISet b = CreateInstance( _bInitValues );
+ ISet a = CreateInstance(_aInitValues);
+ ISet b = CreateInstance(_bInitValues);
- ISet ab = Set.Intersect( a, b );
+ ISet ab = Set.Intersect(a, b);
- Assert.AreEqual( 2, ab.Count, "contains 2 elements - 'two', and 'three'" );
- Assert.IsTrue( ab.Contains( "two" ), "should contain 'two'" );
- Assert.IsTrue( ab.Contains( "three" ), "should contain 'three'" );
+ Assert.AreEqual(2, ab.Count, "contains 2 elements - 'two', and 'three'");
+ Assert.IsTrue(ab.Contains("two"), "should contain 'two'");
+ Assert.IsTrue(ab.Contains("three"), "should contain 'three'");
- Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" );
- Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" );
+ Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
+ Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
- ISet aNull = Set.Intersect( a, null );
- Assert.AreEqual( 0, aNull.Count, "no elements intersected with null set" );
+ ISet aNull = Set.Intersect(a, null);
+ Assert.AreEqual(0, aNull.Count, "no elements intersected with null set");
- ISet bNull = Set.Intersect( null, b );
- Assert.AreEqual( 0, bNull.Count, "no elements intersected with null set" );
+ ISet bNull = Set.Intersect(null, b);
+ Assert.AreEqual(0, bNull.Count, "no elements intersected with null set");
- ISet bothNull = Set.Intersect( null, null );
- Assert.AreEqual( null, bothNull, "null sets intersect as null set" );
+ ISet bothNull = Set.Intersect(null, null);
+ Assert.AreEqual(null, bothNull, "null sets intersect as null set");
}
[Test]
- public void IsEmpty()
+ public void IsEmpty()
{
- Assert.IsFalse( _set.IsEmpty, "set should have initial values" );
+ Assert.IsFalse(_set.IsEmpty, "set should have initial values");
- Assert.IsTrue( CreateInstance().IsEmpty, "new set is empty" );
+ Assert.IsTrue(CreateInstance().IsEmpty, "new set is empty");
}
[Test]
- public void Minus()
+ public void Minus()
{
- ISet a = CreateInstance( _aInitValues );
- ISet b = CreateInstance( _bInitValues );
+ ISet a = CreateInstance(_aInitValues);
+ ISet b = CreateInstance(_bInitValues);
- ISet ab = Set.Minus( a, b );
+ ISet ab = Set.Minus(a, b);
- Assert.AreEqual( 2, ab.Count, "contains 2 elements - 'zero', and 'one'" );
- Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" );
- Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" );
+ Assert.AreEqual(2, ab.Count, "contains 2 elements - 'zero', and 'one'");
+ Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
+ Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
- Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" );
- Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" );
+ Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
+ Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
- ISet aNull = Set.Minus( a, null );
- Assert.IsTrue( aNull.ContainsAll( _aInitValues ), "should have removed no elements" );
+ ISet aNull = Set.Minus(a, null);
+ Assert.IsTrue(aNull.ContainsAll(_aInitValues), "should have removed no elements");
- ISet bNull = Set.Minus( null, b );
- Assert.AreEqual( null, bNull, "null set remained null" );
+ ISet bNull = Set.Minus(null, b);
+ Assert.AreEqual(null, bNull, "null set remained null");
- ISet bothNull = Set.Minus( null, null );
- Assert.AreEqual( null, bothNull, "both sets are null" );
+ ISet bothNull = Set.Minus(null, null);
+ Assert.AreEqual(null, bothNull, "both sets are null");
}
[Test]
- public void Remove()
+ public void Remove()
{
- Assert.IsTrue( _set.Remove( one ), "should have removed 'one'" );
- Assert.IsFalse( _set.Contains( one ), "one should have been removed" );
- Assert.AreEqual( 2, _set.Count, "should be 2 items after one removed." );
+ Assert.IsTrue(_set.Remove(one), "should have removed 'one'");
+ Assert.IsFalse(_set.Contains(one), "one should have been removed");
+ Assert.AreEqual(2, _set.Count, "should be 2 items after one removed.");
- Assert.IsFalse( _set.Remove( one ), "was already removed." );
+ Assert.IsFalse(_set.Remove(one), "was already removed.");
}
[Test]
- public void RemoveAll()
+ public void RemoveAll()
{
ArrayList all = new ArrayList(2);
- all.Add( one );
- all.Add( "not in there" );
+ all.Add(one);
+ all.Add("not in there");
- Assert.IsTrue( _set.RemoveAll( all ), "should have removed an element" );
- Assert.AreEqual( 2, _set.Count, "should be down to 2 elements." );
- Assert.IsFalse( _set.RemoveAll( all ), "all of the elements already removed so set not modified." );
+ Assert.IsTrue(_set.RemoveAll(all), "should have removed an element");
+ Assert.AreEqual(2, _set.Count, "should be down to 2 elements.");
+ Assert.IsFalse(_set.RemoveAll(all), "all of the elements already removed so set not modified.");
}
[Test]
- public void RetainAll()
+ public void RetainAll()
{
ArrayList retain = new ArrayList(2);
- retain.Add( one );
- retain.Add( "not in there" );
+ retain.Add(one);
+ retain.Add("not in there");
- Assert.IsTrue( _set.RetainAll( retain ), "set was modified" );
- Assert.AreEqual( 1, _set.Count, "only 1 element retained" );
+ Assert.IsTrue(_set.RetainAll(retain), "set was modified");
+ Assert.AreEqual(1, _set.Count, "only 1 element retained");
- Assert.IsFalse( _set.RetainAll( retain ), "set was not modified" );
+ Assert.IsFalse(_set.RetainAll(retain), "set was not modified");
}
[Test]
- public void Union()
+ public void Union()
{
- ISet a = CreateInstance( _aInitValues );
- ISet b = CreateInstance( _bInitValues );
+ ISet a = CreateInstance(_aInitValues);
+ ISet b = CreateInstance(_bInitValues);
- ISet ab = Set.Union( a, b );
+ ISet ab = Set.Union(a, b);
- Assert.AreEqual( 5, ab.Count, "contains 5 elements - 'zero' through 'four'" );
- Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" );
- Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" );
- Assert.IsTrue( ab.Contains( "two" ), "should contain 'two'" );
- Assert.IsTrue( ab.Contains( "three" ), "should contain 'three'" );
- Assert.IsTrue( ab.Contains( "four" ), "should contain 'four'" );
+ Assert.AreEqual(5, ab.Count, "contains 5 elements - 'zero' through 'four'");
+ Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
+ Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
+ Assert.IsTrue(ab.Contains("two"), "should contain 'two'");
+ Assert.IsTrue(ab.Contains("three"), "should contain 'three'");
+ Assert.IsTrue(ab.Contains("four"), "should contain 'four'");
- Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" );
- Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" );
+ Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
+ Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
- ISet aNull = Set.Union( a, null );
- Assert.AreEqual( _aInitValues.Count, aNull.Count, "count not changed" );
- Assert.IsTrue( aNull.ContainsAll( _aInitValues ), "still contains all initial values" );
+ ISet aNull = Set.Union(a, null);
+ Assert.AreEqual(_aInitValues.Count, aNull.Count, "count not changed");
+ Assert.IsTrue(aNull.ContainsAll(_aInitValues), "still contains all initial values");
- ISet bNull = Set.Union( null, b );
- Assert.AreEqual( _bInitValues.Count, bNull.Count, "count not changed" );
- Assert.IsTrue( bNull.ContainsAll( _bInitValues ), "still contains all initial values" );
+ ISet bNull = Set.Union(null, b);
+ Assert.AreEqual(_bInitValues.Count, bNull.Count, "count not changed");
+ Assert.IsTrue(bNull.ContainsAll(_bInitValues), "still contains all initial values");
- ISet bothNull = Set.Union( null, null );
- Assert.AreEqual( null, bothNull, "two nulls intersect as null" );
+ ISet bothNull = Set.Union(null, null);
+ Assert.AreEqual(null, bothNull, "two nulls intersect as null");
}
-
+
#endregion
#region Iesi.Collection.ISet Operator Tests
+
[Test]
- public void ExclusiveOrOperator()
+ public void ExclusiveOrOperator()
{
- ISet a = CreateInstance( _aInitValues );
- ISet b = CreateInstance( _bInitValues );
-
- ISet ab = (Set)a ^ (Set)b;
+ ISet a = CreateInstance(_aInitValues);
+ ISet b = CreateInstance(_bInitValues);
- Assert.AreEqual( 3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'" );
- Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" );
- Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" );
- Assert.IsTrue( ab.Contains( "four" ), "should contain 'four'" );
+ ISet ab = (Set) a ^ (Set) b;
- Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" );
- Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" );
+ Assert.AreEqual(3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'");
+ Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
+ Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
+ Assert.IsTrue(ab.Contains("four"), "should contain 'four'");
-
+ Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
+ Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
}
[Test]
- public void IntersectOperator()
+ public void IntersectOperator()
{
- ISet a = CreateInstance( _aInitValues );
- ISet b = CreateInstance( _bInitValues );
+ ISet a = CreateInstance(_aInitValues);
+ ISet b = CreateInstance(_bInitValues);
- ISet ab = (Set)a & (Set)b;
+ ISet ab = (Set) a & (Set) b;
- Assert.AreEqual( 2, ab.Count, "contains 2 elements - 'two', and 'three'" );
- Assert.IsTrue( ab.Contains( "two" ), "should contain 'two'" );
- Assert.IsTrue( ab.Contains( "three" ), "should contain 'three'" );
+ Assert.AreEqual(2, ab.Count, "contains 2 elements - 'two', and 'three'");
+ Assert.IsTrue(ab.Contains("two"), "should contain 'two'");
+ Assert.IsTrue(ab.Contains("three"), "should contain 'three'");
}
[Test]
- public void MinusOperator()
+ public void MinusOperator()
{
- ISet a = CreateInstance( _aInitValues );
- ISet b = CreateInstance( _bInitValues );
+ ISet a = CreateInstance(_aInitValues);
+ ISet b = CreateInstance(_bInitValues);
- ISet ab = (Set)a - (Set)b;
+ ISet ab = (Set) a - (Set) b;
- Assert.AreEqual( 2, ab.Count, "contains 2 elements - 'zero', and 'one'" );
- Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" );
- Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" );
-
- Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" );
- Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" );
+ Assert.AreEqual(2, ab.Count, "contains 2 elements - 'zero', and 'one'");
+ Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
+ Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
+ Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
+ Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
}
[Test]
- public void UnionOperator()
+ public void UnionOperator()
{
- ISet a = CreateInstance( _aInitValues );
- ISet b = CreateInstance( _bInitValues );
-
- ISet ab = (Set)a | (Set)b;
+ ISet a = CreateInstance(_aInitValues);
+ ISet b = CreateInstance(_bInitValues);
- Assert.AreEqual( 5, ab.Count, "contains 5 elements - 'zero' through 'four'" );
- Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" );
- Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" );
- Assert.IsTrue( ab.Contains( "two" ), "should contain 'two'" );
- Assert.IsTrue( ab.Contains( "three" ), "should contain 'three'" );
- Assert.IsTrue( ab.Contains( "four" ), "should contain 'four'" );
+ ISet ab = (Set) a | (Set) b;
- Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" );
- Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" );
+ Assert.AreEqual(5, ab.Count, "contains 5 elements - 'zero' through 'four'");
+ Assert.IsTrue(ab.Contains("zero"), "should contain 'zero'");
+ Assert.IsTrue(ab.Contains("one"), "should contain 'one'");
+ Assert.IsTrue(ab.Contains("two"), "should contain 'two'");
+ Assert.IsTrue(ab.Contains("three"), "should contain 'three'");
+ Assert.IsTrue(ab.Contains("four"), "should contain 'four'");
+ Assert.IsTrue(a.ContainsAll(_aInitValues), "should not have modified a");
+ Assert.IsTrue(b.ContainsAll(_bInitValues), "should not have modified b");
}
-
#endregion
protected abstract ISet CreateInstance();
protected abstract ISet CreateInstance(ICollection init);
- protected abstract System.Type ExpectedType{ get; }
+ protected abstract Type ExpectedType { get; }
}
-}
+}
View
43 src/Iesi.Collections.Test/SortedSetFixture.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections;
-using Iesi.Collections;
-
using NUnit.Framework;
namespace Iesi.Collections.Test
@@ -11,7 +9,7 @@ namespace Iesi.Collections.Test
/// Summary description for SortedSetFixture.
/// </summary>
[TestFixture]
- public class SortedSetFixture : SetFixture
+ public class SortedSetFixture : SetFixture
{
protected override ISet CreateInstance()
{
@@ -20,7 +18,7 @@ protected override ISet CreateInstance()
protected override ISet CreateInstance(ICollection init)
{
- return new SortedSet( init );
+ return new SortedSet(init);
}
protected override Type ExpectedType
@@ -29,41 +27,40 @@ protected override Type ExpectedType
}
[Test]
- public void OrderedEnumeration()
+ public void OrderedEnumeration()
{
- ArrayList expectedOrder = new ArrayList( 3 );
- expectedOrder.Add( one );
- expectedOrder.Add( two );
- expectedOrder.Add( three );
- expectedOrder.Sort( );
+ ArrayList expectedOrder = new ArrayList(3);
+ expectedOrder.Add(one);
+ expectedOrder.Add(two);
+ expectedOrder.Add(three);
+ expectedOrder.Sort();
int index = 0;
- foreach( object obj in _set )
+ foreach (object obj in _set)
{
- Assert.AreEqual( obj, expectedOrder[index], index.ToString() + " did not have same value" );
+ Assert.AreEqual(obj, expectedOrder[index], index.ToString() + " did not have same value");
index++;
}
}
[Test]
- public void OrderedCaseInsensitiveEnumeration()
+ public void OrderedCaseInsensitiveEnumeration()
{
- ArrayList expectedOrder = new ArrayList( 3 );
- expectedOrder.Add( "ONE" );
- expectedOrder.Add( "two" );
- expectedOrder.Add( "tHree" );
+ ArrayList expectedOrder = new ArrayList(3);
+ expectedOrder.Add("ONE");
+ expectedOrder.Add("two");
+ expectedOrder.Add("tHree");
- SortedSet theSet = new SortedSet( expectedOrder, new CaseInsensitiveComparer() );
+ SortedSet theSet = new SortedSet(expectedOrder, new CaseInsensitiveComparer());
- expectedOrder.Sort( new CaseInsensitiveComparer() );
+ expectedOrder.Sort(new CaseInsensitiveComparer());
int index = 0;
- foreach( object obj in theSet )
+ foreach (object obj in theSet)
{
- Assert.AreEqual( obj, expectedOrder[index], index.ToString() + " did not have same value" );
+ Assert.AreEqual(obj, expectedOrder[index], index.ToString() + " did not have same value");
index++;
}
-
}
}
-}
+}
View
38 src/Iesi.Collections/DictionarySet.cs
@@ -1,7 +1,6 @@
-/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
+/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
using System;
using System.Collections;
-using System.Collections.Specialized;
namespace Iesi.Collections
{
@@ -31,7 +30,8 @@ public abstract class DictionarySet : Set
/// if you create your own <c>Set</c> class.
/// </summary>
protected IDictionary InternalDictionary = null;
- private readonly static object PlaceholderObject = new object();
+
+ private static readonly object PlaceholderObject = new object();
/// <summary>
/// The placeholder object used as the value for the <c>IDictionary</c> instance.
@@ -41,7 +41,7 @@ public abstract class DictionarySet : Set
/// </remarks>
protected object Placeholder
{
- get {return PlaceholderObject;}
+ get { return PlaceholderObject; }
}
@@ -52,7 +52,7 @@ protected object Placeholder
/// <returns><c>true</c> is the object was added, <c>false</c> if it was already present.</returns>
public override bool Add(object o)
{
- if(InternalDictionary[o] != null)
+ if (InternalDictionary[o] != null)
return false;
else
{
@@ -71,7 +71,7 @@ public override bool Add(object o)
public override bool AddAll(ICollection c)
{
bool changed = false;
- foreach(object o in c)
+ foreach (object o in c)
changed |= this.Add(o);
return changed;
}
@@ -101,9 +101,9 @@ public override bool Contains(object o)
/// <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns>
public override bool ContainsAll(ICollection c)
{
- foreach(object o in c)
+ foreach (object o in c)
{
- if(!this.Contains(o))
+ if (!this.Contains(o))
return false;
}
return true;
@@ -114,7 +114,7 @@ public override bool ContainsAll(ICollection c)
/// </summary>
public override bool IsEmpty
{
- get{return InternalDictionary.Count == 0;}
+ get { return InternalDictionary.Count == 0; }
}
/// <summary>
@@ -125,7 +125,7 @@ public override bool IsEmpty
public override bool Remove(object o)
{
bool contained = this.Contains(o);
- if(contained)
+ if (contained)
{
InternalDictionary.Remove(o);
}
@@ -140,7 +140,7 @@ public override bool Remove(object o)
public override bool RemoveAll(ICollection c)
{
bool changed = false;
- foreach(object o in c)
+ foreach (object o in c)
changed |= this.Remove(o);
return changed;
}
@@ -157,13 +157,13 @@ public override bool RetainAll(ICollection c)
//We are going to build a set of elements to remove.
Set removeSet = new HybridSet();
-
- foreach(object o in this)
+
+ foreach (object o in this)
{
//If C does not contain O, then we need to remove O from our
//set. We can't do this while iterating through our set, so
//we put it into RemoveSet for later.
- if(!cSet.Contains(o))
+ if (!cSet.Contains(o))
removeSet.Add(o);
}
@@ -187,7 +187,7 @@ public override void CopyTo(Array array, int index)
/// </summary>
public override int Count
{
- get{return InternalDictionary.Count;}
+ get { return InternalDictionary.Count; }
}
/// <summary>
@@ -196,15 +196,15 @@ public override int Count
/// </summary>
public override bool IsSynchronized
{
- get{return false;}
+ get { return false; }
}
-
+
/// <summary>
/// Returns an object that can be used to synchronize the <c>Set</c> between threads.
/// </summary>
public override object SyncRoot
{
- get{return InternalDictionary.SyncRoot;}
+ get { return InternalDictionary.SyncRoot; }
}
/// <summary>
@@ -216,4 +216,4 @@ public override IEnumerator GetEnumerator()
return InternalDictionary.Keys.GetEnumerator();
}
}
-}
+}
View
41 src/Iesi.Collections/Generic/DictionarySet.cs
@@ -1,11 +1,11 @@
#if NET_2_0
-/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
+/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
using System;
+using System.Collections;
using System.Collections.Generic;
-
namespace Iesi.Collections.Generic
{
/// <summary>
@@ -26,15 +26,16 @@ namespace Iesi.Collections.Generic
/// an <c>ISet</c> as an argument.</p>
/// </summary>
[Serializable]
- public abstract class DictionarySet<T> : Set<T>
+ public abstract class DictionarySet<T> : Set<T>
{
/// <summary>
/// Provides the storage for elements in the <c>Set</c>, stored as the key-set
/// of the <c>IDictionary</c> object. Set this object in the constructor
/// if you create your own <c>Set</c> class.
/// </summary>
protected IDictionary<T, object> InternalDictionary = null;
- private readonly static object PlaceholderObject = new object();
+
+ private static readonly object PlaceholderObject = new object();
/// <summary>
/// The placeholder object used as the value for the <c>IDictionary</c> instance.
@@ -44,7 +45,7 @@ public abstract class DictionarySet<T> : Set<T>
/// </remarks>
protected object Placeholder
{
- get {return PlaceholderObject;}
+ get { return PlaceholderObject; }
}
@@ -108,7 +109,7 @@ public override bool Contains(T o)
/// <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns>
public override bool ContainsAll(ICollection<T> c)
{
- foreach(T o in c)
+ foreach (T o in c)
{
if (!this.Contains(o))
{
@@ -123,7 +124,7 @@ public override bool ContainsAll(ICollection<T> c)
/// </summary>
public override bool IsEmpty
{
- get{return InternalDictionary.Count == 0;}
+ get { return InternalDictionary.Count == 0; }
}
/// <summary>
@@ -134,7 +135,7 @@ public override bool IsEmpty
public override bool Remove(T o)
{
bool contained = this.Contains(o);
- if(contained)
+ if (contained)
{
InternalDictionary.Remove(o);
}
@@ -168,13 +169,13 @@ public override bool RetainAll(ICollection<T> c)
//We are going to build a set of elements to remove.
Set<T> removeSet = new HashedSet<T>();
-
- foreach(T o in this)
+
+ foreach (T o in this)
{
//If C does not contain O, then we need to remove O from our
//set. We can't do this while iterating through our set, so
//we put it into RemoveSet for later.
- if(!cSet.Contains(o))
+ if (!cSet.Contains(o))
removeSet.Add(o);
}
@@ -198,7 +199,7 @@ public override void CopyTo(T[] array, int index)
/// </summary>
public override int Count
{
- get{return InternalDictionary.Count;}
+ get { return InternalDictionary.Count; }
}
/// <summary>
@@ -207,15 +208,15 @@ public override int Count
/// </summary>
public override bool IsSynchronized
{
- get{return false;}
+ get { return false; }
}
-
+
/// <summary>
/// Returns an object that can be used to synchronize the <c>Set</c> between threads.
/// </summary>
public override object SyncRoot
{
- get{return ((System.Collections.ICollection)InternalDictionary).SyncRoot;}
+ get { return ((ICollection) InternalDictionary).SyncRoot; }
}
/// <summary>
@@ -232,10 +233,7 @@ public override IEnumerator<T> GetEnumerator()
/// </summary>
public override bool IsReadOnly
{
- get
- {
- return InternalDictionary.IsReadOnly;
- }
+ get { return InternalDictionary.IsReadOnly; }
}
/// <summary>
@@ -247,8 +245,9 @@ public override bool IsReadOnly
/// <param name="index">The zero-based index where copying will start.</param>
protected override void NonGenericCopyTo(Array array, int index)
{
- ((System.Collections.ICollection)InternalDictionary.Keys).CopyTo(array, index);
+ ((ICollection) InternalDictionary.Keys).CopyTo(array, index);
}
}
}
-#endif
+
+#endif
View
5 src/Iesi.Collections/Generic/HashedSet.cs
@@ -1,6 +1,6 @@
#if NET_2_0
-/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
+/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
using System;
using System.Collections.Generic;
@@ -33,4 +33,5 @@ public HashedSet(ICollection<T> initialValues) : this()
}
}
}
-#endif
+
+#endif
View
5 src/Iesi.Collections/Generic/ISet.cs
@@ -107,7 +107,7 @@ public interface ISet<T> : ICollection<T>, IEnumerable<T>, IEnumerable, ICloneab
/// <summary>
/// Returns <c>true</c> if this set contains no elements.
/// </summary>
- bool IsEmpty{get;}
+ bool IsEmpty { get; }
/// <summary>
/// Adds the specified element to this set if it is not already present.
@@ -139,4 +139,5 @@ public interface ISet<T> : ICollection<T>, IEnumerable<T>, IEnumerable, ICloneab
bool RetainAll(ICollection<T> c);
}
}
-#endif
+
+#endif
View
88 src/Iesi.Collections/Generic/ImmutableSet.cs
@@ -1,10 +1,10 @@
#if NET_2_0
-/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
+/* Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. */
using System;
+using System.Collections;
using System.Collections.Generic;
-
namespace Iesi.Collections.Generic
{
/// <summary>
@@ -23,10 +23,7 @@ public sealed class ImmutableSet<T> : Set<T>
internal ISet<T> BasisSet
{
- get
- {
- return mBasisSet;
- }
+ get { return mBasisSet; }
}
/// <summary>
@@ -44,7 +41,7 @@ public ImmutableSet(ISet<T> basisSet)
/// <param name="o">The object to add to the set.</param>
/// <returns>nothing</returns>
/// <exception cref="NotSupportedException"> is always thrown</exception>
- public sealed override bool Add(T o)
+ public override sealed bool Add(T o)
{
throw new NotSupportedException(ERROR_MESSAGE);
}
@@ -55,7 +52,7 @@ public sealed override bool Add(T o)
/// <param name="c">A collection of objects to add to the set.</param>
/// <returns>nothing</returns>
/// <exception cref="NotSupportedException"> is always thrown</exception>
- public sealed override bool AddAll(ICollection<T> c)
+ public override sealed bool AddAll(ICollection<T> c)
{
throw new NotSupportedException(ERROR_MESSAGE);
}
@@ -64,7 +61,7 @@ public sealed override bool AddAll(ICollection<T> c)
/// Removes all objects from the set.
/// </summary>
/// <exception cref="NotSupportedException"> is always thrown</exception>
- public sealed override void Clear()
+ public override sealed void Clear()
{
throw new NotSupportedException(ERROR_MESSAGE);
}
@@ -74,7 +71,7 @@ public sealed override void Clear()
/// </summary>
/// <param name="o">The element to look for.</param>
/// <returns><c>true</c> if this set contains the specified element, <c>false</c> otherwise.</returns>
- public sealed override bool Contains(T o)
+ public override sealed bool Contains(T o)
{
return mBasisSet.Contains(o);
}
@@ -84,17 +81,17 @@ public sealed override bool Contains(T o)
/// </summary>
/// <param name="c">A collection of objects.</param>
/// <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns>
- public sealed override bool ContainsAll(ICollection<T> c)
+ public override sealed bool ContainsAll(ICollection<T> c)
{
return mBasisSet.ContainsAll(c);
}
/// <summary>
/// Returns <c>true</c> if this set contains no elements.
/// </summary>
- public sealed override bool IsEmpty
+ public override sealed bool IsEmpty
{
- get{return mBasisSet.IsEmpty;}
+ get { return mBasisSet.IsEmpty; }
}
/// <summary>
@@ -103,7 +100,7 @@ public sealed override bool IsEmpty
/// <param name="o">The element to be removed.</param>
/// <returns>nothing</returns>
/// <exception cref="NotSupportedException"> is always thrown</exception>
- public sealed override bool Remove(T o)
+ public override sealed bool Remove(T o)
{
throw new NotSupportedException(ERROR_MESSAGE);
}
@@ -114,7 +111,7 @@ public sealed override bool Remove(T o)
/// <param name="c">A collection of elements to remove.</param>
/// <returns>nothing</returns>
/// <exception cref="NotSupportedException"> is always thrown</exception>
- public sealed override bool RemoveAll(ICollection<T> c)
+ public override sealed bool RemoveAll(ICollection<T> c)
{
throw new NotSupportedException(ERROR_MESSAGE);
}
@@ -125,7 +122,7 @@ public sealed override bool RemoveAll(ICollection<T> c)
/// <param name="c">Collection that defines the set of elements to be retained.</param>
/// <returns>nothing</returns>
/// <exception cref="NotSupportedException"> is always thrown</exception>
- public sealed override bool RetainAll(ICollection<T> c)
+ public override sealed bool RetainAll(ICollection<T> c)
{
throw new NotSupportedException(ERROR_MESSAGE);
}
@@ -136,46 +133,40 @@ public sealed override bool RetainAll(ICollection<T> c)
/// </summary>
/// <param name="array">An array that will be the target of the copy operation.</param>
/// <param name="index">The zero-based index where copying will start.</param>
- public sealed override void CopyTo(T[] array, int index)
+ public override sealed void CopyTo(T[] array, int index)
{
mBasisSet.CopyTo(array, index);
}
/// <summary>
/// The number of elements contained in this collection.
/// </summary>
- public sealed override int Count
+ public override sealed int Count
{
- get{return mBasisSet.Count;}
+ get { return mBasisSet.Count; }
}
/// <summary>
/// Returns an object that can be used to synchronize use of the <c>Set</c> across threads.
/// </summary>
- public sealed override bool IsSynchronized
+ public override sealed bool IsSynchronized
{
- get
- {
- return ((System.Collections.ICollection)mBasisSet).IsSynchronized;
- }
+ get { return ((ICollection) mBasisSet).IsSynchronized; }
}
/// <summary>
- /// Returns an object that can be used to synchronize the <c>Set</c> between threads.
+ /// Returns an object that can be used to synchronize the <c>Set</c> between threads.
/// </summary>
- public sealed override object SyncRoot
+ public override sealed object SyncRoot
{
- get
- {
- return ((System.Collections.ICollection)mBasisSet).SyncRoot;
- }
+ get { return ((ICollection) mBasisSet).SyncRoot; }
}
/// <summary>
/// Gets an enumerator for the elements in the <c>Set</c>.
/// </summary>
/// <returns>An <c>IEnumerator</c> over the elements in the <c>Set</c>.</returns>
- public sealed override IEnumerator<T> GetEnumerator()
+ public override sealed IEnumerator<T> GetEnumerator()
{
return mBasisSet.GetEnumerator();
}
@@ -184,7 +175,7 @@ public sealed override IEnumerator<T> GetEnumerator()
/// Returns a clone of the <c>Set</c> instance.
/// </summary>
/// <returns>A clone of this object.</returns>
- public sealed override object Clone()
+ public override sealed object Clone()
{
return new ImmutableSet<T>(mBasisSet);
}
@@ -198,7 +189,7 @@ public sealed override object Clone()
/// <param name="a">A collection of elements.</param>
/// <returns>A new <c>Set</c> containing the union of this <c>Set</c> with the specified collection.