9 types derived from FrozenDictionary
System.Collections.Immutable (9)
114 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)>>>();
413var handlersForMethod = _handlerInfoMap[work.MethodName];
Microsoft.CodeAnalysis.Workspaces (1)
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)>>>();
413var 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 (49)
System\Collections\Frozen\FrozenDictionary.cs (40)
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>
27/// <returns>A <see cref="FrozenDictionary{TKey, TValue}"/> that contains the specified keys and values.</returns>
28public static FrozenDictionary<TKey, TValue> Create<TKey, TValue>(params ReadOnlySpan<KeyValuePair<TKey, TValue>> source)
32/// <summary>Creates a <see cref="FrozenDictionary{TKey, TValue}"/> with the specified key/value pairs.</summary>
41/// <returns>A <see cref="FrozenDictionary{TKey, TValue}"/> that contains the specified keys and values.</returns>
42public static FrozenDictionary<TKey, TValue> Create<TKey, TValue>(IEqualityComparer<TKey>? comparer, params ReadOnlySpan<KeyValuePair<TKey, TValue>> source)
49return ReferenceEquals(comparer, FrozenDictionary<TKey, TValue>.Empty.Comparer) ?
50FrozenDictionary<TKey, TValue>.Empty :
63/// <summary>Creates a <see cref="FrozenDictionary{TKey, TValue}"/> with the specified key/value pairs.</summary>
72/// <returns>A <see cref="FrozenDictionary{TKey, TValue}"/> that contains the specified keys and values.</returns>
73public static FrozenDictionary<TKey, TValue> ToFrozenDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? comparer = null)
78/// <summary>Creates a <see cref="FrozenDictionary{TKey, TSource}"/> from an <see cref="IEnumerable{TSource}"/> according to specified key selector function.</summary>
81/// <param name="source">An <see cref="IEnumerable{TSource}"/> from which to create a <see cref="FrozenDictionary{TKey, TSource}"/>.</param>
84/// <returns>A <see cref="FrozenDictionary{TKey, TElement}"/> that contains the keys and values selected from the input sequence.</returns>
85public static FrozenDictionary<TKey, TSource> ToFrozenDictionary<TSource, TKey>(
90/// <summary>Creates a <see cref="FrozenDictionary{TKey, TElement}"/> from an <see cref="IEnumerable{TSource}"/> according to specified key selector and element selector functions.</summary>
94/// <param name="source">An <see cref="IEnumerable{TSource}"/> from which to create a <see cref="FrozenDictionary{TKey, TElement}"/>.</param>
98/// <returns>A <see cref="FrozenDictionary{TKey, TElement}"/> that contains the keys and values selected from the input sequence.</returns>
99public static FrozenDictionary<TKey, TElement> ToFrozenDictionary<TSource, TKey, TElement>(
105/// Extracts from the source either an existing <see cref="FrozenDictionary{TKey,TValue}"/> instance or a <see cref="Dictionary{TKey,TValue}"/>
109/// If <paramref name="source"/> is already a <see cref="FrozenDictionary{TKey,TValue}"/> with the same <paramref name="comparer"/>, returns that instance.
110/// If <paramref name="source"/> is empty, returns an empty <see cref="FrozenDictionary{TKey,TValue}"/> with the specified <paramref name="comparer"/>.
114private static FrozenDictionary<TKey, TValue>? GetExistingFrozenOrNewDictionary<TKey, TValue>(
123if (source is FrozenDictionary<TKey, TValue> fd && fd.Comparer.Equals(comparer))
146return ReferenceEquals(comparer, FrozenDictionary<TKey, TValue>.Empty.Comparer) ?
147FrozenDictionary<TKey, TValue>.Empty :
157private static FrozenDictionary<TKey, TValue> CreateFromDictionary<TKey, TValue>(Dictionary<TKey, TValue> source)
182return (FrozenDictionary<TKey, TValue>)(object)new SmallValueTypeComparableFrozenDictionary<TKey, TValue>(source);
186return (FrozenDictionary<TKey, TValue>)(object)new SmallValueTypeDefaultComparerFrozenDictionary<TKey, TValue>(source);
194return (FrozenDictionary<TKey, TValue>)(object)new Int32FrozenDictionary<TValue>((Dictionary<int, TValue>)(object)source);
225FrozenDictionary<string, TValue>? frozenDictionary = LengthBucketsFrozenDictionary<TValue>.CreateLengthBucketsFrozenDictionaryIfAppropriate(keys, values, stringComparer, minLength, maxLength);
228return (FrozenDictionary<TKey, TValue>)(object)frozenDictionary;
280return (FrozenDictionary<TKey, TValue>)(object)frozenDictionary;
299/// <see cref="FrozenDictionary{TKey, TValue}"/> is immutable and is optimized for situations where a dictionary
303/// the remainder of the life of the application. <see cref="FrozenDictionary{TKey, TValue}"/> should only be
316/// <summary>Gets an empty <see cref="FrozenDictionary{TKey, TValue}"/>.</summary>
317public static FrozenDictionary<TKey, TValue> Empty { get; } = new EmptyFrozenDictionary<TKey, TValue>(EqualityComparer<TKey>.Default);
534internal delegate ref readonly TValue AlternateLookupDelegate<TAlternateKey>(FrozenDictionary<TKey, TValue> dictionary, TAlternateKey key)
671/// <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)