4 instantiations of OneOrMany
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
291return new(this.ToImmutableAndClear());
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (3)
27public static readonly OneOrMany<T> Empty = new OneOrMany<T>(ImmutableArray<T>.Empty); 165? new OneOrMany<T>(from._one) 166: new OneOrMany<T>(ImmutableArray<T>.CastUp(from._many));
20 references to OneOrMany
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (20)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (3)
307public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 378public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 403public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg)
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (3)
277/// Create an <see cref="OneOrMany{T}"/> with the elements currently held in the temporary array, and clear the 280public OneOrMany<T> ToOneOrManyAndClear() 285return OneOrMany<T>.Empty;
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
466public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector)
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (13)
24[DebuggerTypeProxy(typeof(OneOrMany<>.DebuggerProxy))] 27public static readonly OneOrMany<T> Empty = new OneOrMany<T>(ImmutableArray<T>.Empty); 93public OneOrMany<T> Add(T item) 113public OneOrMany<T> RemoveAll(T item) 123public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 130public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 162public static OneOrMany<T> CastUp<TDerived>(OneOrMany<TDerived> from) where TDerived : class, T 190public bool SequenceEqual(OneOrMany<T> other, IEqualityComparer<T>? comparer = null) 236private readonly OneOrMany<T> _collection; 239internal Enumerator(OneOrMany<T> collection) 254private sealed class DebuggerProxy(OneOrMany<T> instance) 256private readonly OneOrMany<T> _instance = instance;