JsonMetadataServices.CreateImmutableDictionaryInfo<TCollection,TKey,TValue> 메서드

정의

에 할당할 수 있는 및 형식에 대한 ImmutableDictionary<TKey,TValue> 메타데이터를 IReadOnlyDictionary<TKey,TValue>만듭니다.

public:
generic <typename TCollection, typename TKey, typename TValue>
 where TCollection : System::Collections::Generic::IReadOnlyDictionary<TKey, TValue> static System::Text::Json::Serialization::Metadata::JsonTypeInfo<TCollection> ^ CreateImmutableDictionaryInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues<TCollection> ^ collectionInfo, Func<System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^, TCollection> ^ createRangeFunc);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<TCollection> CreateImmutableDictionaryInfo<TCollection,TKey,TValue> (System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<TCollection> collectionInfo, Func<System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>,TCollection> createRangeFunc) where TCollection : System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>;
static member CreateImmutableDictionaryInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<'Collection (requires 'Collection :> System.Collections.Generic.IReadOnlyDictionary<'Key, 'Value>)> * Func<seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>>, 'Collection (requires 'Collection :> System.Collections.Generic.IReadOnlyDictionary<'Key, 'Value>)> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Collection (requires 'Collection :> System.Collections.Generic.IReadOnlyDictionary<'Key, 'Value>)> (requires 'Collection :> System.Collections.Generic.IReadOnlyDictionary<'Key, 'Value>)
Public Shared Function CreateImmutableDictionaryInfo(Of TCollection As IReadOnlyDictionary(Of TKey, TValue), TKey As IReadOnlyDictionary(Of TKey, TValue), TValue As IReadOnlyDictionary(Of TKey, TValue)) (options As JsonSerializerOptions, collectionInfo As JsonCollectionInfoValues(Of TCollection), createRangeFunc As Func(Of IEnumerable(Of KeyValuePair(Of TKey, TValue)), TCollection)) As JsonTypeInfo(Of TCollection)

형식 매개 변수

TCollection

형식의 제네릭 정의입니다.

TKey

키 형식의 제네릭 정의입니다.

TValue

값 형식의 제네릭 정의입니다.

매개 변수

options
JsonSerializerOptions

JsonSerializerOptions serialization 및 deserialization에 사용할 입니다.

collectionInfo
JsonCollectionInfoValues<TCollection>

컬렉션 형식에 대한 serialization 메타데이터를 제공합니다.

createRangeFunc
Func<IEnumerable<KeyValuePair<TKey,TValue>>,TCollection>

변경할 수 없는 사전 인스턴스를 만드는 메서드입니다.

반환

JsonTypeInfo<TCollection>

지정된 형식에 대한 serialization 메타데이터입니다.

설명

이 API는 System.Text.Json 원본 생성기의 출력에서 사용하기 위한 것이며 직접 호출해서는 안 됩니다.

적용 대상