Click or drag to resize

ClassSerializerBase<TValue> Class

Represents an abstract base class for class serializers.
Inheritance Hierarchy
System.Object
  MongoDB.Bson.Serialization.Serializers.SerializerBase<TValue>
    MongoDB.Bson.Serialization.Serializers.ClassSerializerBase<TValue>
      More...

Namespace:  MongoDB.Bson.Serialization.Serializers
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public abstract class ClassSerializerBase<TValue> : SerializerBase<TValue>
where TValue : class

Type Parameters

TValue
The type of the value.

The ClassSerializerBase<TValue> type exposes the following members.

Constructors
  NameDescription
Protected methodClassSerializerBase<TValue>
Initializes a new instance of the ClassSerializerBase<TValue> class
Top
Properties
Methods
  NameDescription
Protected methodCreateCannotBeDeserializedException
Creates an exception to throw when a type cannot be deserialized.
(Inherited from SerializerBase<TValue>.)
Protected methodCreateCannotBeSerializedException
Creates an exception to throw when a type cannot be deserialized.
(Inherited from SerializerBase<TValue>.)
Protected methodCreateCannotDeserializeFromBsonTypeException
Creates an exception to throw when a type cannot be deserialized from a BsonType.
(Inherited from SerializerBase<TValue>.)
Public methodDeserialize
Deserializes a value.
(Overrides SerializerBase<TValue>.Deserialize(BsonDeserializationContext, BsonDeserializationArgs).)
Protected methodDeserializeValue
Deserializes a class.
Protected methodEnsureBsonTypeEquals
Ensures that the BsonType equals the expected type.
(Inherited from SerializerBase<TValue>.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetActualType
Gets the actual type.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSerialize
Serializes a value.
(Overrides SerializerBase<TValue>.Serialize(BsonSerializationContext, BsonSerializationArgs, TValue).)
Protected methodSerializeValue
Serializes a value of type {TValue}.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also
Inheritance Hierarchy
System.Object
  MongoDB.Bson.Serialization.Serializers.SerializerBase<TValue>
    MongoDB.Bson.Serialization.Serializers.ClassSerializerBase<TValue>
      MongoDB.Bson.Serialization.BsonDocumentBackedClassSerializer<TClass>
      MongoDB.Bson.Serialization.Serializers.AbstractClassSerializer<TClass>
      MongoDB.Bson.Serialization.Serializers.CultureInfoSerializer
      MongoDB.Bson.Serialization.Serializers.DictionarySerializerBase<TDictionary>
      MongoDB.Bson.Serialization.Serializers.DictionarySerializerBase<TDictionary, TKey, TValue>
      MongoDB.Bson.Serialization.Serializers.IPAddressSerializer
      MongoDB.Bson.Serialization.Serializers.IPEndPointSerializer
      MongoDB.Bson.Serialization.Serializers.ObjectSerializer
      MongoDB.Bson.Serialization.Serializers.UriSerializer
      MongoDB.Driver.AggregateBucketAutoResultIdSerializer<TValue>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJson2DCoordinatesSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJson2DGeographicCoordinatesSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJson2DProjectedCoordinatesSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJson3DCoordinatesSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJson3DGeographicCoordinatesSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJson3DProjectedCoordinatesSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonBoundingBoxSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonCoordinateReferenceSystemSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonCoordinatesSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonFeatureCollectionSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonFeatureSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonGeometryCollectionSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonGeometrySerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonLinearRingCoordinatesSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonLineStringCoordinatesSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonLineStringSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonLinkedCoordinateReferenceSystemSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonMultiLineStringCoordinatesSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonMultiLineStringSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonMultiPointCoordinatesSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonMultiPointSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonMultiPolygonCoordinatesSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonMultiPolygonSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonNamedCoordinateReferenceSystemSerializer
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonObjectSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonPointSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonPolygonCoordinatesSerializer<TCoordinates>
      MongoDB.Driver.GeoJsonObjectModel.Serializers.GeoJsonPolygonSerializer<TCoordinates>
      MongoDB.Driver.MongoDBRefSerializer