39 references to Add
Microsoft.CodeAnalysis (3)
ImmutableSegmentedDictionary`2.cs (1)
323=> Add(key, value);
RoslynImmutableInterlocked.cs (2)
442var updatedCollection = priorCollection.Add(key, value); 544var updatedCollection = priorCollection.Add(key, value);
Microsoft.CodeAnalysis.CSharp (1)
Symbols\NamedTypeSymbol.cs (1)
29private static readonly ImmutableSegmentedDictionary<string, Symbol> RequiredMembersErrorSentinel = ImmutableSegmentedDictionary<string, Symbol>.Empty.Add("<error sentinel>", null!);
Microsoft.CodeAnalysis.UnitTests (35)
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (13)
57var set = ImmutableSegmentedDictionary<int, string>.Empty.Add(1, "1"); 126var collection = ImmutableSegmentedDictionary<int, string?>.Empty.Add(1, null); 172var map = ImmutableSegmentedDictionary.Create<string, int>().Add("five", 5); 182.Add("a", "1").Add("B", "1").ToBuilder(); 206.Add("a", "1").Add("A", "1").ToBuilder(); 218.Add("a", "1").Add("A", "2").Add("b", "3").ToBuilder(); 226.Add("a", "1").Add("B", "1").ToBuilder(); 238var populated = ImmutableSegmentedDictionary.Create<string, int>().Add("a", 5).ToBuilder();
Collections\ImmutableSegmentedDictionaryTest.cs (22)
40.Add("Johnny", "Appleseed") 41.Add("JOHNNY", "Appleseed"); 55.Add("Johnny", "Appleseed") 56.Add("JOHNNY", "Appleseed"); 173var map = ImmutableSegmentedDictionary.Create<string, string>().Add("a", "1").Add("B", "1"); 191.Add("a", "1").Add("A", "1"); 200.Add("a", "1").Add("A", "2").Add("b", "3"); 208.Add("firstKey", "1").Add("secondKey", "2"); 209var exception = Assert.Throws<ArgumentException>(null, () => map.Add("firstKey", "3")); 226IImmutableDictionary<string, int> populated = ImmutableSegmentedDictionary.Create<string, int>().Add("a", 5); 237var populated = ImmutableSegmentedDictionary.Create<string, int>().Add("a", 5); 248ImmutableSegmentedDictionary<string, int> dict = ImmutableSegmentedDictionary.Create<string, int>().Add("One", 1).Add("Two", 2); 289clearedDictionary = clearedDictionary.Add("a", 1); 297.Add("a", "1").Add("b", "2"); 322Assert.True(map.Add(key, value).ContainsValue(value));