C# Class MongoDB.Bson.BsonTypeMapper

A static class that maps between .NET objects and BsonValues.
ファイルを表示 Open project: Qiredev/mongo-csharp-driver Class Usage Examples

Public Methods

Method Description
MapToBsonValue ( object value ) : BsonValue

Maps an object to a BsonValue.

MapToBsonValue ( object value, BsonType bsonType ) : BsonValue

Maps an object to a specific BsonValue type.

RegisterCustomTypeMapper ( Type type, ICustomBsonTypeMapper customTypeMapper ) : void

Registers a custom type mapper.

TryMapToBsonValue ( object value, BsonValue &bsonValue ) : bool

Tries to map an object to a BsonValue.

Private Methods

Method Description
Convert ( object value, Conversion conversion ) : BsonValue

Method Details

MapToBsonValue() public static method

Maps an object to a BsonValue.
public static MapToBsonValue ( object value ) : BsonValue
value object An object.
return BsonValue

MapToBsonValue() public static method

Maps an object to a specific BsonValue type.
public static MapToBsonValue ( object value, BsonType bsonType ) : BsonValue
value object An object.
bsonType BsonType The BsonType to map to.
return BsonValue

RegisterCustomTypeMapper() public static method

Registers a custom type mapper.
public static RegisterCustomTypeMapper ( Type type, ICustomBsonTypeMapper customTypeMapper ) : void
type System.Type The type.
customTypeMapper ICustomBsonTypeMapper A custom type mapper.
return void

TryMapToBsonValue() public static method

Tries to map an object to a BsonValue.
public static TryMapToBsonValue ( object value, BsonValue &bsonValue ) : bool
value object An object.
bsonValue BsonValue The BsonValue.
return bool