7 implementations of Add
Microsoft.CodeAnalysis (1)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
326IImmutableSet<T> IImmutableSet<T>.Add(T value)
Microsoft.CodeAnalysis.CodeStyle (1)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
326IImmutableSet<T> IImmutableSet<T>.Add(T value)
Microsoft.CodeAnalysis.Collections.Package (1)
ImmutableSegmentedHashSet`1.cs (1)
326IImmutableSet<T> IImmutableSet<T>.Add(T value)
Microsoft.CodeAnalysis.Workspaces (1)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
326IImmutableSet<T> IImmutableSet<T>.Add(T value)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Dependencies\Collections\ImmutableSegmentedHashSet`1.cs (1)
326IImmutableSet<T> IImmutableSet<T>.Add(T value)
System.Collections.Immutable (2)
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
358IImmutableSet<T> IImmutableSet<T>.Add(T item)
System\Collections\Immutable\ImmutableSortedSet_1.cs (1)
610IImmutableSet<T> IImmutableSet<T>.Add(T value)
37 references to Add
Microsoft.CodeAnalysis.UnitTests (37)
Collections\ImmutableSegmentedHashSetTest.nonnetstandard.cs (1)
53var reemptied = emptySet.Add(value).Clear();
Collections\ImmutableSetTest.cs (23)
41RemoveTestHelper(this.Empty<int>().Add(3).Add(5), 5, 3); 62set = set.Add(i); 76var set = this.Empty<int>().Add(5); 104var nonEmptySet = this.Empty<int>().Add(5); 146Assert.False(Empty<int>().Add(3).Equals(Empty<int>().Add(3))); 147Assert.False(Empty<int>().Add(5).Equals(Empty<int>().Add(3))); 148Assert.False(Empty<int>().Add(3).Add(5).Equals(Empty<int>().Add(3))); 149Assert.False(Empty<int>().Add(3).Equals(Empty<int>().Add(3).Add(5))); 163var nonEmptySet = originalSet.Add(5); 196builder = (ICollection)this.Empty<string>().Add("a"); 211var set = empty.Add(null); 266set = set.Add(value); 418var newSet = set.Add(value); 441set = set.Add(value); 504var nextSet = set.Add(value); 521Assert.True(IsSame(nextSet, nextSet.Add(value))); //, "Adding duplicate value {0} should keep the original reference.", value);
Collections\ImmutableSetTest.nonnetstandard.cs (13)
25ExceptTestHelper(Empty<int>().Add(1).Add(3).Add(5).Add(7), 3, 7); 31SymmetricExceptTestHelper(Empty<int>().Add(1).Add(3).Add(5).Add(7), Enumerable.Range(0, 9).ToArray()); 32SymmetricExceptTestHelper(Empty<int>().Add(1).Add(3).Add(5).Add(7), Enumerable.Range(0, 5).ToArray()); 98set = set.Add(expected);