Class NullableSerializer<T>
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
Represents a serializer for nullable values.
public class NullableSerializer<T> : SerializerBase<T?>, IBsonSerializer<T?>, IBsonSerializer, IChildSerializerConfigurable, INullableSerializer where T : structType Parameters
- T
- The underlying type. 
- Inheritance
- 
      
      SerializerBase<T?>NullableSerializer<T>
- Implements
- 
      IBsonSerializer<T?>
- 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. 
- Serialize(BsonSerializationContext, BsonSerializationArgs, T?)
- Serializes a value. 
- WithSerializer(IBsonSerializer<T>)
- Returns a serializer that has been reconfigured with the specified serializer.