22 references to Add
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
82
value = value.
Add
(file);
MetadataReference\AssemblyIdentityMap.cs (1)
104
_map[identity.Name] = _map.TryGetValue(identity.Name, out sameName) ? sameName.
Add
(pair) : OneOrMany.Create(pair);
Microsoft.CodeAnalysis.CSharp (7)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1909
resultsByContainingType[containingType] = previousResults.
Add
(result);
Compilation\CSharpCompilation.cs (4)
1075
builder[path] = builder.ContainsKey(path) ? builder[path].
Add
(tree) : OneOrMany.Create(tree);
1101
builder[hash] = builder.TryGetValue(hash, out var existing) ? existing.
Add
(tree) : OneOrMany.Create(tree);
1127
builder[path] = builder.ContainsKey(path) ? builder[path].
Add
(tree) : OneOrMany.Create(tree);
2497
return existingValues.
Add
(newValue);
FlowAnalysis\NullableWalker.cs (1)
1015
@return = @return.
Add
(getFieldSymbolToBeInitialized(member));
Lowering\SyntheticBoundNodeFactory.cs (1)
520
(local != null) ? innerInstrumentation.Locals.
Add
(local) : innerInstrumentation.Locals,
Microsoft.CodeAnalysis.UnitTests (13)
InternalUtilities\OneOrManyTests.cs (13)
49
Verify(OneOrMany.Create(ImmutableArray<int>.Empty).
Add
(3), 3);
52
Verify(new OneOrMany<int>(ImmutableArray<int>.Empty).
Add
(3), 3);
66
Verify(OneOrMany.Create(ImmutableArray.Create(1, 2, 3)).
Add
(4), 1, 2, 3, 4);
68
Verify(OneOrMany.Create(ImmutableArray<int>.Empty).
Add
(1).
Add
(2).
Add
(3).
Add
(4), 1, 2, 3, 4);
69
Verify(new OneOrMany<int>(ImmutableArray.Create(1, 2, 3)).
Add
(4), 1, 2, 3, 4);
71
Verify(new OneOrMany<int>(ImmutableArray<int>.Empty).
Add
(1).
Add
(2).
Add
(3).
Add
(4), 1, 2, 3, 4);
72
Verify(OneOrMany.Create(ImmutableArray.Create(1)).
Add
(4), 1, 4);