@@ -43,105 +43,6 @@ public bool Add(object o)
43
43
return tempObject == null ;
44
44
}
45
45
46
-
47
- #if ! NET_4_0 // Only in Iesi's ISet<>.
48
- public bool AddAll ( ICollection < object > c )
49
- {
50
- bool changed = false ;
51
-
52
- foreach ( object o in c )
53
- changed |= Add ( o ) ;
54
-
55
- return changed ;
56
- }
57
-
58
- public bool ContainsAll ( ICollection < object > c )
59
- {
60
- foreach ( object o in c )
61
- {
62
- if ( ! map . Contains ( o ) )
63
- return false ;
64
- }
65
- return true ;
66
- }
67
-
68
- public bool RemoveAll ( ICollection < object > c )
69
- {
70
- bool changed = false ;
71
- foreach ( object o in c )
72
- {
73
- changed |= Contains ( o ) ;
74
- Remove ( o ) ;
75
- }
76
- return changed ;
77
- }
78
-
79
- public bool RetainAll ( ICollection < object > c )
80
- {
81
- //doable if needed
82
- throw new NotSupportedException ( ) ;
83
- }
84
-
85
- protected void NonGenericCopyTo ( Array array , int index )
86
- {
87
- map . CopyTo ( array , index ) ;
88
- }
89
-
90
- public bool IsEmpty
91
- {
92
- get { return map . Count == 0 ; }
93
- }
94
-
95
- public bool IsSynchronized
96
- {
97
- get { return false ; }
98
- }
99
-
100
- public object SyncRoot
101
- {
102
- get { return this ; }
103
- }
104
-
105
- #region Implementation of ICloneable
106
-
107
- public object Clone ( )
108
- {
109
- return new IdentitySet ( this ) ;
110
- }
111
-
112
- #endregion
113
-
114
- #region Implementation of ISet<object>
115
-
116
- public ISet < object > Union ( ISet < object > a )
117
- {
118
- return new IdentitySet ( this . Concat ( a ) ) ;
119
- }
120
-
121
- public ISet < object > Intersect ( ISet < object > a )
122
- {
123
- // Be careful to use the Contains() implementation of the IdentitySet,
124
- // not the one from the other set.
125
- var elems = a . Where ( e => Contains ( a ) ) ;
126
- return new IdentitySet ( elems ) ;
127
- }
128
-
129
- public ISet < object > Minus ( ISet < object > a )
130
- {
131
- var set = new IdentitySet ( this ) ;
132
- set . RemoveAll ( a ) ;
133
- return set ;
134
- }
135
-
136
- public ISet < object > ExclusiveOr ( ISet < object > a )
137
- {
138
- return Union ( a ) . Minus ( Intersect ( a ) ) ;
139
- }
140
-
141
- #endregion
142
-
143
- #endif
144
-
145
46
public void Clear ( )
146
47
{
147
48
map . Clear ( ) ;
@@ -184,8 +85,6 @@ public bool IsReadOnly
184
85
get { return false ; }
185
86
}
186
87
187
- #if NET_4_0
188
-
189
88
#region Implementation of ISet<object>
190
89
191
90
public void UnionWith ( IEnumerable < object > other )
@@ -253,8 +152,5 @@ public bool SetEquals(IEnumerable<object> other)
253
152
}
254
153
255
154
#endregion
256
-
257
- #endif
258
-
259
155
}
260
156
}
0 commit comments