Language

JsonConvertedValueReaderWriter<TModel,TProvider> Class

Definition

A JsonValueReaderWriter<TValue> that wraps an existing reader/writer and adds conversions from the model type to and from the provider type.

[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })]
public class JsonConvertedValueReaderWriter<TModel,TProvider> : Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter<TModel>, Microsoft.EntityFrameworkCore.Storage.Internal.IJsonConvertedValueReaderWriter
[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>]
type JsonConvertedValueReaderWriter<'Model, 'Provider> = class
    inherit JsonValueReaderWriter<'Model>
    interface IJsonConvertedValueReaderWriter
    interface ICompositeJsonValueReaderWriter
Public Class JsonConvertedValueReaderWriter(Of TModel, TProvider)
Inherits JsonValueReaderWriter(Of TModel)
Implements IJsonConvertedValueReaderWriter

Type Parameters

TModel

The model type.

TProvider

The provider type.

Inheritance
JsonConvertedValueReaderWriter<TModel,TProvider>
Attributes
Implements
Microsoft.EntityFrameworkCore.Storage.Internal.ICompositeJsonValueReaderWriter Microsoft.EntityFrameworkCore.Storage.Internal.IJsonConvertedValueReaderWriter

Constructors

Name Description
JsonConvertedValueReaderWriter<TModel,TProvider>(JsonValueReaderWriter<TProvider>, ValueConverter)

Creates a new instance of this reader/writer wrapping the given reader/writer.

Properties

Name Description
ConstructorExpression

The expression representing construction of this object.

HandlesNullWrites

If true, then the nulls will be passed to the writer's ToJson(Utf8JsonWriter, Object) method. Otherwise null values will always be written as null.

ValueType

The type of the value being read/written.

(Inherited from JsonValueReaderWriter<TValue>)

Methods

Name Description
FromJson(Utf8JsonReaderManager, Object)

Reads the value from a UTF8 JSON stream or buffer.

(Inherited from JsonValueReaderWriter<TValue>)
FromJsonString(String, Object)

Reads the value from JSON in a string.

(Inherited from JsonValueReaderWriter)
FromJsonTyped(Utf8JsonReaderManager, Object)

Reads the value from JSON.

ToJson(Utf8JsonWriter, Object)

Writes the value to JSON.

(Inherited from JsonValueReaderWriter<TValue>)
ToJsonObjectString(String, Object)

Returns a string containg a JSON object whith the specified property and value.

(Inherited from JsonValueReaderWriter)
ToJsonString(Object)

Writes the value to a JSON string.

(Inherited from JsonValueReaderWriter)
ToJsonTyped(Utf8JsonWriter, TModel)

Writes the value to JSON.

Explicit Interface Implementations

Name Description
ICompositeJsonValueReaderWriter.InnerReaderWriter
IJsonConvertedValueReaderWriter.Converter

Applies to