Class BsonClassMap
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Bson.dll
Represents a mapping between a class and a BSON document.
public class BsonClassMap
Inheritance
BsonClassMap
Derived
Inherited Members
Extension Methods
Constructors
Initializes a new instance of the BsonClassMap class.
BsonClassMap(Type, BsonClassMap)
Initializes a new instance of the BsonClassMap class.
Properties
Gets all the member maps (including maps for inherited members).
Gets the base class map.
Gets the class type.
Gets the conventions used for auto mapping.
Gets the constructor maps.
Gets the declared member maps (only for members declared in this class).
Gets the discriminator.
Gets whether a discriminator is required when serializing this class.
Gets the member map of the member used to hold extra elements.
Gets whether this class map has any creator maps.
Gets whether this class has a root class ancestor.
Gets the Id member map (null if none).
Gets whether extra elements should be ignored when deserializing.
IgnoreExtraElementsIsInherited
Gets whether the IgnoreExtraElements value should be inherited by derived classes.
Gets whether this class is anonymous.
Gets whether the class map is frozen.
Gets whether this class is a root class.
Gets the known types of this class.
Methods
Adds a known type to the class map.
Automaps the class.
Creates an instance of the class.
Determines whether the specified object is equal to the current object.
Freezes the class map.
Serves as the default hash function.
Gets the type of a member.
Gets a member map (only considers members declared in this class).
GetMemberMapForElement(string)
Gets the member map for a BSON element.
Gets all registered class maps.
Checks whether a class map is registered for a type.
Looks up a class map (will AutoMap the class if no class map is registered).
MapConstructor(ConstructorInfo)
Creates a creator map for a constructor and adds it to the class map.
MapConstructor(ConstructorInfo, params string[])
Creates a creator map for a constructor and adds it to the class map.
Creates a creator map and adds it to the class.
MapCreator(Delegate, params string[])
Creates a creator map and adds it to the class.
Creates a member map for the extra elements field and adds it to the class map.
MapExtraElementsMember(MemberInfo)
Creates a member map for the extra elements member and adds it to the class map.
MapExtraElementsProperty(string)
Creates a member map for the extra elements property and adds it to the class map.
Creates a creator map for a factory method and adds it to the class.
MapFactoryMethod(MethodInfo, params string[])
Creates a creator map for a factory method and adds it to the class.
Creates a member map for a field and adds it to the class map.
Creates a member map for the Id field and adds it to the class map.
Creates a member map for the Id member and adds it to the class map.
Creates a member map for the Id property and adds it to the class map.
Creates a member map for a member and adds it to the class map.
Creates a member map for a property and adds it to the class map.
RegisterClassMap(BsonClassMap)
Registers a class map.
Creates and registers a class map.
RegisterClassMap(Action<BsonClassMap>)
Creates and registers a class map.
Resets the class map back to its initial state.
Sets the creator for the object.
Sets the discriminator.
SetDiscriminatorConvention(IDiscriminatorConvention)
Sets the discriminator convention.
SetDiscriminatorIsRequired(bool)
Sets whether a discriminator is required when serializing this class.
SetExtraElementsMember(BsonMemberMap)
Sets the member map of the member used to hold extra elements.
Sets the Id member.
Sets whether extra elements should be ignored when deserializing.
SetIgnoreExtraElementsIsInherited(bool)
Sets whether the IgnoreExtraElements value should be inherited by derived classes.
Sets whether this class is a root class.
Registers a class map if it is not already registered.
TryRegisterClassMap(BsonClassMap)
Registers a class map if it is not already registered.
TryRegisterClassMap(Action<BsonClassMap>)
Registers a class map if it is not already registered.
TryRegisterClassMap(Func<BsonClassMap>)
Registers a class map if it is not already registered.
UnmapConstructor(ConstructorInfo)
Removes a creator map for a constructor from the class map.
UnmapFactoryMethod(MethodInfo)
Removes a creator map for a factory method from the class map.
Removes the member map for a field from the class map.
Removes a member map from the class map.
Removes the member map for a property from the class map.