9 types derived from FrozenDictionary
System.Collections.Immutable (9)
113 references to FrozenDictionary
Microsoft.Analyzers.Extra.Tests (1)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Diagnostics.Middleware (3)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.OutputCaching (2)
Microsoft.AspNetCore.Routing (9)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Shared.Tests (2)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol (15)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (6)
76private readonly FrozenDictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata Metadata, IMethodHandler Handler, MethodInfo MethodInfo)>>> _handlerInfoMap;
94private static FrozenDictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>> BuildHandlerMap(AbstractHandlerProvider handlerProvider, AbstractTypeRefResolver typeRefResolver)
96var genericMethodMap = new Dictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>>();
411var handlersForMethod = _handlerInfoMap[work.MethodName];
Microsoft.CodeAnalysis.Workspaces (8)
Microsoft.CommonLanguageServerProtocol.Framework.Package (9)
RequestExecutionQueue.cs (6)
76private readonly FrozenDictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata Metadata, IMethodHandler Handler, MethodInfo MethodInfo)>>> _handlerInfoMap;
94private static FrozenDictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>> BuildHandlerMap(AbstractHandlerProvider handlerProvider, AbstractTypeRefResolver typeRefResolver)
96var genericMethodMap = new Dictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>>();
411var handlersForMethod = _handlerInfoMap[work.MethodName];
Microsoft.Extensions.Compliance.Redaction (2)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (3)
Microsoft.Extensions.Http.Diagnostics (9)
Microsoft.Extensions.Telemetry (1)
System.Collections.Immutable (41)
System\Collections\Frozen\FrozenDictionary.cs (32)
15/// Provides a set of initialization methods for instances of the <see cref="FrozenDictionary{TKey, TValue}"/> class.
19/// <summary>Creates a <see cref="FrozenDictionary{TKey, TValue}"/> with the specified key/value pairs.</summary>
28/// <returns>A <see cref="FrozenDictionary{TKey, TValue}"/> that contains the specified keys and values.</returns>
29public static FrozenDictionary<TKey, TValue> ToFrozenDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? comparer = null)
34/// <summary>Creates a <see cref="FrozenDictionary{TKey, TSource}"/> from an <see cref="IEnumerable{TSource}"/> according to specified key selector function.</summary>
37/// <param name="source">An <see cref="IEnumerable{TSource}"/> from which to create a <see cref="FrozenDictionary{TKey, TSource}"/>.</param>
40/// <returns>A <see cref="FrozenDictionary{TKey, TElement}"/> that contains the keys and values selected from the input sequence.</returns>
41public static FrozenDictionary<TKey, TSource> ToFrozenDictionary<TSource, TKey>(
46/// <summary>Creates a <see cref="FrozenDictionary{TKey, TElement}"/> from an <see cref="IEnumerable{TSource}"/> according to specified key selector and element selector functions.</summary>
50/// <param name="source">An <see cref="IEnumerable{TSource}"/> from which to create a <see cref="FrozenDictionary{TKey, TElement}"/>.</param>
54/// <returns>A <see cref="FrozenDictionary{TKey, TElement}"/> that contains the keys and values selected from the input sequence.</returns>
55public static FrozenDictionary<TKey, TElement> ToFrozenDictionary<TSource, TKey, TElement>(
61/// Extracts from the source either an existing <see cref="FrozenDictionary{TKey,TValue}"/> instance or a <see cref="Dictionary{TKey,TValue}"/>
65/// If <paramref name="source"/> is already a <see cref="FrozenDictionary{TKey,TValue}"/> with the same <paramref name="comparer"/>, returns that instance.
66/// If <paramref name="source"/> is empty, returns an empty <see cref="FrozenDictionary{TKey,TValue}"/> with the specified <paramref name="comparer"/>.
70private static FrozenDictionary<TKey, TValue>? GetExistingFrozenOrNewDictionary<TKey, TValue>(
79if (source is FrozenDictionary<TKey, TValue> fd && fd.Comparer.Equals(comparer))
102return ReferenceEquals(comparer, FrozenDictionary<TKey, TValue>.Empty.Comparer) ?
103FrozenDictionary<TKey, TValue>.Empty :
113private static FrozenDictionary<TKey, TValue> CreateFromDictionary<TKey, TValue>(Dictionary<TKey, TValue> source)
138return (FrozenDictionary<TKey, TValue>)(object)new SmallValueTypeComparableFrozenDictionary<TKey, TValue>(source);
142return (FrozenDictionary<TKey, TValue>)(object)new SmallValueTypeDefaultComparerFrozenDictionary<TKey, TValue>(source);
150return (FrozenDictionary<TKey, TValue>)(object)new Int32FrozenDictionary<TValue>((Dictionary<int, TValue>)(object)source);
181FrozenDictionary<string, TValue>? frozenDictionary = LengthBucketsFrozenDictionary<TValue>.CreateLengthBucketsFrozenDictionaryIfAppropriate(keys, values, stringComparer, minLength, maxLength);
184return (FrozenDictionary<TKey, TValue>)(object)frozenDictionary;
236return (FrozenDictionary<TKey, TValue>)(object)frozenDictionary;
255/// <see cref="FrozenDictionary{TKey, TValue}"/> is immutable and is optimized for situations where a dictionary
259/// the remainder of the life of the application. <see cref="FrozenDictionary{TKey, TValue}"/> should only be
271/// <summary>Gets an empty <see cref="FrozenDictionary{TKey, TValue}"/>.</summary>
272public static FrozenDictionary<TKey, TValue> Empty { get; } = new EmptyFrozenDictionary<TKey, TValue>(EqualityComparer<TKey>.Default);
489internal delegate ref readonly TValue AlternateLookupDelegate<TAlternateKey>(FrozenDictionary<TKey, TValue> dictionary, TAlternateKey key)
626/// <summary>Enumerates the elements of a <see cref="FrozenDictionary{TKey, TValue}"/>.</summary>
System\Collections\Frozen\Integer\DenseIntegralFrozenDictionary.cs (5)
16/// <summary>Provides a <see cref="FrozenDictionary{TKey, TValue}"/> for densely-packed integral keys.</summary>
29public static FrozenDictionary<TKey, TValue>? CreateIfValid<TKey, TValue>(Dictionary<TKey, TValue> source)
44private static FrozenDictionary<TKey, TValue>? CreateIfValid<TKey, TKeyUnderlying, TValue>(Dictionary<TKey, TValue> source)
119FrozenDictionary<TKey, TValue>(EqualityComparer<TKey>.Default)
150FrozenDictionary<TKey, TValue>(EqualityComparer<TKey>.Default)