Class MemorySerializerBase<TItem, TMemory>
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
Represents an abstract base class for Memory<T> and ReadOnlyMemory<T> serializers.
public abstract class MemorySerializerBase<TItem, TMemory> : StructSerializerBase<TMemory>, IBsonSerializer<TMemory>, IBsonSerializer, IRepresentationConfigurable<MemorySerializerBase<TItem, TMemory>>, IRepresentationConfigurable, IHasRepresentationSerializer where TMemory : struct
Type Parameters
TItem
The type of the item. Only primitive numeric types are supported.
TMemory
The type of the memory struct.
- Inheritance
-
SerializerBase<TMemory>StructSerializerBase<TMemory>MemorySerializerBase<TItem, TMemory>
- Implements
-
IBsonSerializer<TMemory>IRepresentationConfigurable<MemorySerializerBase<TItem, TMemory>>
- Derived
- Inherited Members
- Extension Methods
Constructors
- MemorySerializerBase()
Initializes a new instance of the MemorySerializerBase<TItem, TMemory> class.
- MemorySerializerBase(BsonType)
Initializes a new instance of the MemorySerializerBase<TItem, TMemory> class.
Properties
- Representation
Gets the representation.
Methods
- CreateMemory(TItem[])
Creates the Memory{TITem} structure.
- Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
- Equals(object)
Determines whether the specified object is equal to the current object.
- GetHashCode()
Serves as the default hash function.
- GetMemory(TMemory)
Get the memory structure from TMemory instance.
- Serialize(BsonSerializationContext, BsonSerializationArgs, TMemory)
Serializes a value.
- WithRepresentation(BsonType)
Returns a serializer that has been reconfigured with the specified representation.