Skip to content

Commit f2d6d38

Browse files
committed
NH-3807 - Remove pre-.NET 4.0 compatibility with old Iesi ISet.
1 parent 53ad5c4 commit f2d6d38

File tree

1 file changed

+0
-104
lines changed

1 file changed

+0
-104
lines changed

src/NHibernate/Util/IdentitySet.cs

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -43,105 +43,6 @@ public bool Add(object o)
4343
return tempObject == null;
4444
}
4545

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-
14546
public void Clear()
14647
{
14748
map.Clear();
@@ -184,8 +85,6 @@ public bool IsReadOnly
18485
get { return false; }
18586
}
18687

187-
#if NET_4_0
188-
18988
#region Implementation of ISet<object>
19089

19190
public void UnionWith(IEnumerable<object> other)
@@ -253,8 +152,5 @@ public bool SetEquals(IEnumerable<object> other)
253152
}
254153

255154
#endregion
256-
257-
#endif
258-
259155
}
260156
}

0 commit comments

Comments
 (0)