19 references to OneOrMany
Microsoft.CodeAnalysis (19)
Collections\ArrayBuilderExtensions.cs (2)
263
var result =
OneOrMany
.Create(builder[0]);
269
return
OneOrMany
.Create(builder.ToImmutableAndFree());
Collections\OrderPreservingMultiDictionary.cs (2)
162
return valueSet.Count == 1 ?
OneOrMany
.Create(valueSet[0]) :
OneOrMany
.Create(valueSet.Items);
Collections\TemporaryArray`1.cs (1)
287
var result =
OneOrMany
.Create(this[0]);
InternalUtilities\OneOrMany.cs (9)
94
=> HasOneItem ?
OneOrMany
.Create(_one, item) :
95
IsEmpty ?
OneOrMany
.Create(item) :
96
OneOrMany
.Create(_many.Add(item));
120
return
OneOrMany
.Create(_many.WhereAsArray(static (value, item) => !EqualityComparer<T>.Default.Equals(value, item), item));
126
OneOrMany
.Create(selector(_one)) :
127
OneOrMany
.Create(_many.SelectAsArray(selector));
133
OneOrMany
.Create(selector(_one, arg)) :
134
OneOrMany
.Create(_many.SelectAsArray(selector, arg));
206
=> SequenceEqual(
OneOrMany
.Create(other), comparer);
MetadataReference\AssemblyIdentityMap.cs (1)
103
_map[identity.Name] = _map.TryGetValue(identity.Name, out sameName) ? sameName.Add(pair) :
OneOrMany
.Create(pair);
SourceGeneration\Nodes\NodeStateTable.cs (4)
339
_states.Add(new TableEntry(
OneOrMany
.Create(chosen), state));
450
_states.Add(new TableEntry(
OneOrMany
.Create(value), state));
457
var tableEntry = new TableEntry(
OneOrMany
.Create(values), state);
651
return new TableEntry(
OneOrMany
.Create(itemBuilder.ToImmutableArray()), s_allCachedEntries, anyRemoved: false);