C# Class MongoDB.Bson.Serialization.BsonClassMapSerializer

Represents a serializer for a class map.
Exibir arquivo Open project: egametang/Egametang Class Usage Examples

Public Methods

Method Description
BsonClassMapSerializer ( BsonClassMap classMap ) : System

Initializes a new instance of the BsonClassMapSerializer class.

Deserialize ( MongoDB.Bson.IO.BsonReader bsonReader, Type nominalType, IBsonSerializationOptions options ) : object

Deserializes an object from a BsonReader.

Deserialize ( MongoDB.Bson.IO.BsonReader bsonReader, Type nominalType, Type actualType, IBsonSerializationOptions options ) : object

Deserializes an object from a BsonReader.

GetDefaultSerializationOptions ( ) : IBsonSerializationOptions

Get the default serialization options for this serializer.

GetDocumentId ( object document, object &id, Type &idNominalType, IIdGenerator &idGenerator ) : bool

Gets the document Id.

GetMemberSerializationInfo ( string memberName ) : BsonSerializationInfo

Gets the serialization info for a member.

Serialize ( BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options ) : void

Serializes an object to a BsonWriter.

SetDocumentId ( object document, object id ) : void

Sets the document Id.

Private Methods

Method Description
ChooseBestCreator ( object>.Dictionary values ) : BsonCreatorMap
CreateInstanceUsingCreator ( object>.Dictionary values ) : object
DeserializeExtraElement ( MongoDB.Bson.IO.BsonReader bsonReader, object obj, string elementName, BsonMemberMap extraElementsMemberMap ) : void
DeserializeMemberValue ( MongoDB.Bson.IO.BsonReader bsonReader, BsonMemberMap memberMap ) : object
SerializeExtraElements ( BsonWriter bsonWriter, object obj, BsonMemberMap extraElementsMemberMap ) : void
SerializeMember ( BsonWriter bsonWriter, object obj, BsonMemberMap memberMap ) : void
VerifyNominalType ( Type nominalType ) : void

Method Details

BsonClassMapSerializer() public method

Initializes a new instance of the BsonClassMapSerializer class.
public BsonClassMapSerializer ( BsonClassMap classMap ) : System
classMap BsonClassMap The class map.
return System

Deserialize() public method

Deserializes an object from a BsonReader.
public Deserialize ( MongoDB.Bson.IO.BsonReader bsonReader, Type nominalType, IBsonSerializationOptions options ) : object
bsonReader MongoDB.Bson.IO.BsonReader The BsonReader.
nominalType System.Type The nominal type of the object.
options IBsonSerializationOptions The serialization options.
return object

Deserialize() public method

Deserializes an object from a BsonReader.
public Deserialize ( MongoDB.Bson.IO.BsonReader bsonReader, Type nominalType, Type actualType, IBsonSerializationOptions options ) : object
bsonReader MongoDB.Bson.IO.BsonReader The BsonReader.
nominalType System.Type The nominal type of the object.
actualType System.Type The actual type of the object.
options IBsonSerializationOptions The serialization options.
return object

GetDefaultSerializationOptions() public method

Get the default serialization options for this serializer.
public GetDefaultSerializationOptions ( ) : IBsonSerializationOptions
return IBsonSerializationOptions

GetDocumentId() public method

Gets the document Id.
public GetDocumentId ( object document, object &id, Type &idNominalType, IIdGenerator &idGenerator ) : bool
document object The document.
id object The Id.
idNominalType System.Type The nominal type of the Id.
idGenerator IIdGenerator The IdGenerator for the Id type.
return bool

GetMemberSerializationInfo() public method

Gets the serialization info for a member.
public GetMemberSerializationInfo ( string memberName ) : BsonSerializationInfo
memberName string The member name.
return BsonSerializationInfo

Serialize() public method

Serializes an object to a BsonWriter.
public Serialize ( BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options ) : void
bsonWriter MongoDB.Bson.IO.BsonWriter The BsonWriter.
nominalType System.Type The nominal type.
value object The object.
options IBsonSerializationOptions The serialization options.
return void

SetDocumentId() public method

Sets the document Id.
public SetDocumentId ( object document, object id ) : void
document object The document.
id object The Id.
return void