JsonMetadataServices.CreateImmutableEnumerableInfo<TCollection,TElement> メソッド

定義

ディクショナリ以外の変更できないコレクション型のメタデータを作成します。

public:
generic <typename TCollection, typename TElement>
 where TCollection : System::Collections::Generic::IEnumerable<TElement> static System::Text::Json::Serialization::Metadata::JsonTypeInfo<TCollection> ^ CreateImmutableEnumerableInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues<TCollection> ^ collectionInfo, Func<System::Collections::Generic::IEnumerable<TElement> ^, TCollection> ^ createRangeFunc);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<TCollection> CreateImmutableEnumerableInfo<TCollection,TElement>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<TCollection> collectionInfo, Func<System.Collections.Generic.IEnumerable<TElement>,TCollection> createRangeFunc) where TCollection : System.Collections.Generic.IEnumerable<TElement>;
static member CreateImmutableEnumerableInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<#seq<'Element>> * Func<seq<'Element>, #seq<'Element>> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<#seq<'Element>>
Public Shared Function CreateImmutableEnumerableInfo(Of TCollection As IEnumerable(Of TElement), TElement As IEnumerable(Of TElement)) (options As JsonSerializerOptions, collectionInfo As JsonCollectionInfoValues(Of TCollection), createRangeFunc As Func(Of IEnumerable(Of TElement), TCollection)) As JsonTypeInfo(Of TCollection)

型パラメーター

TCollection

型のジェネリック定義。

TElement

要素型のジェネリック定義。

パラメーター

options
JsonSerializerOptions

シリアル化と逆シリアル化に使用する JsonSerializerOptions

collectionInfo
JsonCollectionInfoValues<TCollection>

コレクション型に関するシリアル化メタデータを提供します。

createRangeFunc
Func<IEnumerable<TElement>,TCollection>

変更できないディクショナリ インスタンスを作成するメソッド。

返品

JsonTypeInfo<TCollection>

指定された型のシリアル化メタデータ。

注釈

この API は System.Text.Json ソース ジェネレーターの出力で使用されるため、直接呼び出すべきではありません。

適用対象