1 instantiation of EmptyReadOnlyList
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
19public static readonly EmptyReadOnlyList<T> Instance = new();
14 references to EmptyReadOnlyList
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (14)
src\Shared\EmptyCollections\Empty.cs (3)
24public static IReadOnlyCollection<T> ReadOnlyCollection<T>() => EmptyReadOnlyList<T>.Instance; 31public static IEnumerable<T> Enumerable<T>() => EmptyReadOnlyList<T>.Instance; 38public static IReadOnlyList<T> ReadOnlyList<T>() => EmptyReadOnlyList<T>.Instance;
src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (7)
33=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 63=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 102return EmptyReadOnlyList<T>.Instance; 108return EmptyReadOnlyList<T>.Instance; 114return EmptyReadOnlyList<T>.Instance;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (3)
24public IEnumerable<TKey> Keys => EmptyReadOnlyList<TKey>.Instance; 25public IEnumerable<TValue> Values => EmptyReadOnlyList<TValue>.Instance; 27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator();
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
19public static readonly EmptyReadOnlyList<T> Instance = new();