Class UInt64Serializer
- Namespace
 - MongoDB.Bson.Serialization.Serializers
 
- Assembly
 - MongoDB.Bson.dll
 
Represents a serializer for UInt64s.
[CLSCompliant(false)]
public class UInt64Serializer : StructSerializerBase<ulong>, IBsonSerializer<ulong>, IBsonSerializer, IRepresentationConfigurable<UInt64Serializer>, IRepresentationConfigurable, IHasRepresentationSerializer, IRepresentationConverterConfigurable<UInt64Serializer>, IRepresentationConverterConfigurable
  - Inheritance
 - 
      
      
      
      UInt64Serializer
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
UInt64Serializer()
Initializes a new instance of the UInt64Serializer class.
public UInt64Serializer()
  UInt64Serializer(BsonType)
Initializes a new instance of the UInt64Serializer class.
public UInt64Serializer(BsonType representation)
  Parameters
representationBsonTypeThe representation.
UInt64Serializer(BsonType, RepresentationConverter)
Initializes a new instance of the UInt64Serializer class.
public UInt64Serializer(BsonType representation, RepresentationConverter converter)
  Parameters
representationBsonTypeThe representation.
converterRepresentationConverterThe converter.
Properties
Converter
Gets the converter.
public RepresentationConverter Converter { get; }
  Property Value
- RepresentationConverter
 The converter.
Representation
Gets the representation.
public BsonType Representation { get; }
  Property Value
- BsonType
 The representation.
Methods
Deserialize(BsonDeserializationContext, BsonDeserializationArgs)
Deserializes a value.
public override ulong Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
  Parameters
contextBsonDeserializationContextThe deserialization context.
argsBsonDeserializationArgsThe deserialization args.
Returns
- ulong
 A deserialized value.
Serialize(BsonSerializationContext, BsonSerializationArgs, ulong)
Serializes a value.
public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, ulong value)
  Parameters
contextBsonSerializationContextThe serialization context.
argsBsonSerializationArgsThe serialization args.
valueulongThe object.
WithConverter(RepresentationConverter)
Returns a serializer that has been reconfigured with the specified item serializer.
public UInt64Serializer WithConverter(RepresentationConverter converter)
  Parameters
converterRepresentationConverterThe converter.
Returns
- UInt64Serializer
 The reconfigured serializer.
WithRepresentation(BsonType)
Returns a serializer that has been reconfigured with the specified representation.
public UInt64Serializer WithRepresentation(BsonType representation)
  Parameters
representationBsonTypeThe representation.
Returns
- UInt64Serializer
 The reconfigured serializer.