Method WithRepresentation
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
WithRepresentation(BsonType)
Returns a serializer that has been reconfigured with the specified representation.
public TimeSpanSerializer WithRepresentation(BsonType representation)Parameters
- representationBsonType
- The representation. 
Returns
- TimeSpanSerializer
- The reconfigured serializer. 
WithRepresentation(BsonType, TimeSpanUnits)
Returns a serializer that has been reconfigured with the specified representation and units.
public TimeSpanSerializer WithRepresentation(BsonType representation, TimeSpanUnits units)Parameters
- representationBsonType
- The representation. 
- unitsTimeSpanUnits
- The units. 
Returns
- TimeSpanSerializer
- The reconfigured serializer.