Share via


JsonValueReaderWriter.CreateFromType(Type) Method

Definition

Creates a JsonValueReaderWriter<TValue> instance of the given type, using the Instance property to get th singleton instance if possible.

public static Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter? CreateFromType (Type? readerWriterType);
static member CreateFromType : Type -> Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter
Public Shared Function CreateFromType (readerWriterType As Type) As JsonValueReaderWriter

Parameters

readerWriterType
Type

The type, which must inherit from JsonValueReaderWriter<TValue>.

Returns

The reader/writer instance./

Exceptions

if the type does not represent a JsonValueReaderWriter<TValue> that can be instantiated.

Applies to