14 references to OneOrMany
Microsoft.CodeAnalysis.CodeStyle (14)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
162return valueSet.Count == 1 ? OneOrMany.Create(valueSet[0]) : OneOrMany.Create(valueSet.Items);
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
287var result = OneOrMany.Create(this[0]);
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (9)
94=> HasOneItem ? OneOrMany.Create(_one, item) : 95IsEmpty ? OneOrMany.Create(item) : 96OneOrMany.Create(_many.Add(item)); 120return OneOrMany.Create(_many.WhereAsArray(static (value, item) => !EqualityComparer<T>.Default.Equals(value, item), item)); 126OneOrMany.Create(selector(_one)) : 127OneOrMany.Create(_many.SelectAsArray(selector)); 133OneOrMany.Create(selector(_one, arg)) : 134OneOrMany.Create(_many.SelectAsArray(selector, arg)); 206=> SequenceEqual(OneOrMany.Create(other), comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (2)
215return OneOrMany.Create(namedType); 226return OneOrMany.Create(builder.ToImmutableAndClear());