Table of Contents

Class NullableSerializer<T>

Namespace
MongoDB.Bson.Serialization.Serializers
Assembly
MongoDB.Bson.dll

Represents a serializer for nullable values.

public sealed class NullableSerializer<T> : SerializerBase<T?>, IBsonSerializer<T?>, IBsonSerializer, IChildSerializerConfigurable, INullableSerializer where T : struct

Type Parameters

T

The underlying type.

Inheritance
NullableSerializer<T>
Implements
Inherited Members
Extension Methods

Constructors

NullableSerializer()

Initializes a new instance of the NullableSerializer<T> class.

NullableSerializer(IBsonSerializerRegistry)

Initializes a new instance of the NullableSerializer<T> class.

NullableSerializer(IBsonSerializer<T>)

Initializes a new instance of the NullableSerializer<T> class.

Properties

ValueSerializer

Gets the value serializer.

Methods

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.

Serialize(BsonSerializationContext, BsonSerializationArgs, T?)

Serializes a value.

WithSerializer(IBsonSerializer<T>)

Returns a serializer that has been reconfigured with the specified serializer.