Class JsonCollectionReaderWriter<TCollection, TConcreteCollection, TElement>
- Namespace
- Microsoft.EntityFrameworkCore.Storage.Json
- Assembly
- Microsoft.EntityFrameworkCore.dll
A JsonValueReaderWriter<TValue> for collections of primitive elements that are a not Nullable.
public class JsonCollectionReaderWriter<TCollection, TConcreteCollection, TElement> : JsonValueReaderWriter<IEnumerable<TElement?>>, ICompositeJsonValueReaderWriter where TCollection : IEnumerable<TElement?>
Type Parameters
TCollection
The collection type.
TConcreteCollection
The collection type to create an index of, if needed.
TElement
The element type.
- Inheritance
-
JsonValueReaderWriter<IEnumerable<TElement>>JsonCollectionReaderWriter<TCollection, TConcreteCollection, TElement>
- Implements
- Inherited Members
Constructors
JsonCollectionReaderWriter(JsonValueReaderWriter<TElement>)
Creates a new instance of this collection reader/writer, using the given reader/writer for its elements.
public JsonCollectionReaderWriter(JsonValueReaderWriter<TElement> elementReaderWriter)
Parameters
elementReaderWriter
JsonValueReaderWriter<TElement>The reader/writer to use for each element.
Methods
FromJsonTyped(ref Utf8JsonReaderManager, object?)
public override IEnumerable<TElement?> FromJsonTyped(ref Utf8JsonReaderManager manager, object? existingObject = null)
Parameters
manager
Utf8JsonReaderManagerexistingObject
object
Returns
- IEnumerable<TElement>
ToJsonTyped(Utf8JsonWriter, IEnumerable<TElement?>)
public override void ToJsonTyped(Utf8JsonWriter writer, IEnumerable<TElement?> value)
Parameters
writer
Utf8JsonWritervalue
IEnumerable<TElement>