Class BsonClassMap
- Namespace
- MongoDB.Bson.Serialization
- Assembly
- MongoDB.Bson.dll
Represents a mapping between a class and a BSON document.
- Inheritance
-
Bson
Class Map
- Derived
-
Bson
Class <TClass>Map
- Inherited Members
- Extension Methods
Constructors
- Bson
Class Map(Type) Initializes a new instance of the BsonClassMap class.
- Bson
Class Map(Type, Bson Class Map) Initializes a new instance of the Bson
Class class.Map
Properties
- All
Member Maps Gets all the member maps (including maps for inherited members).
- Base
Class Map Gets the base class map.
- Class
Type Gets the class type.
- Convention
Pack Gets the conventions used for auto mapping.
- Creator
Maps Gets the constructor maps.
- Declared
Member Maps Gets the declared member maps (only for members declared in this class).
- Discriminator
Gets the discriminator.
- Discriminator
IsRequired Gets whether a discriminator is required when serializing this class.
- Extra
Elements Member Map Gets the member map of the member used to hold extra elements.
- Has
Creator Maps Gets whether this class map has any creator maps.
- Has
Root Class Gets whether this class has a root class ancestor.
- Id
Member Map Gets the Id member map (null if none).
- Ignore
Extra Elements Gets whether extra elements should be ignored when deserializing.
- Ignore
Extra Elements IsInherited Gets whether the IgnoreExtraElements value should be inherited by derived classes.
- Is
Anonymous Gets whether this class is anonymous.
- Is
Frozen Gets whether the class map is frozen.
- Is
Root Class Gets whether this class is a root class.
- Known
Types Gets the known types of this class.
Methods
- Add
Known Type(Type) Adds a known type to the class map.
- Auto
Map() Automaps the class.
- Create
Instance() Creates an instance of the class.
- Equals(object)
Determines whether the specified object is equal to the current object.
- Freeze()
Freezes the class map.
- Get
Hash Code() Serves as the default hash function.
- Get
Member Info Type(Member Info) Gets the type of a member.
- Get
Member Map(string) Gets a member map (only considers members declared in this class).
- Get
Member Map For Element(string) Gets the member map for a BSON element.
- Get
Registered Class Maps() Gets all registered class maps.
- Is
Class Map Registered(Type) Checks whether a class map is registered for a type.
- Lookup
Class Map(Type) Looks up a class map (will AutoMap the class if no class map is registered).
- Map
Constructor(Constructor Info) Creates a creator map for a constructor and adds it to the class map.
- Map
Constructor(Constructor Info, params string[]) Creates a creator map for a constructor and adds it to the class map.
- Map
Creator(Delegate) Creates a creator map and adds it to the class.
- Map
Creator(Delegate, params string[]) Creates a creator map and adds it to the class.
- Map
Extra Elements Field(string) Creates a member map for the extra elements field and adds it to the class map.
- Map
Extra Elements Member(Member Info) Creates a member map for the extra elements member and adds it to the class map.
- Map
Extra Elements Property(string) Creates a member map for the extra elements property and adds it to the class map.
- Map
Factory Method(Method Info) Creates a creator map for a factory method and adds it to the class.
- Map
Factory Method(Method Info, params string[]) Creates a creator map for a factory method and adds it to the class.
- Map
Field(string) Creates a member map for a field and adds it to the class map.
- Map
IdField(string) Creates a member map for the Id field and adds it to the class map.
- Map
IdMember(Member Info) Creates a member map for the Id member and adds it to the class map.
- Map
IdProperty(string) Creates a member map for the Id property and adds it to the class map.
- Map
Member(Member Info) Creates a member map for a member and adds it to the class map.
- Map
Property(string) Creates a member map for a property and adds it to the class map.
- Register
Class Map(Bson Class Map) Registers a class map.
- RegisterClassMap<TClass>()
Creates and registers a class map.
- RegisterClassMap<TClass>(Action<BsonClassMap<TClass>>)
Creates and registers a class map.
- Reset()
Resets the class map back to its initial state.
- SetCreator(Func<object>)
Sets the creator for the object.
- Set
Discriminator(string) Sets the discriminator.
- Set
Discriminator Convention(IDiscriminator Convention) Sets the discriminator convention.
- Set
Discriminator IsRequired(bool) Sets whether a discriminator is required when serializing this class.
- Set
Extra Elements Member(Bson Member Map) Sets the member map of the member used to hold extra elements.
- Set
IdMember(Bson Member Map) Sets the Id member.
- Set
Ignore Extra Elements(bool) Sets whether extra elements should be ignored when deserializing.
- Set
Ignore Extra Elements IsInherited(bool) Sets whether the IgnoreExtraElements value should be inherited by derived classes.
- Set
IsRoot Class(bool) Sets whether this class is a root class.
- TryRegisterClassMap<TClass>()
Registers a class map if it is not already registered.
- TryRegisterClassMap<TClass>(BsonClassMap<TClass>)
Registers a class map if it is not already registered.
- TryRegisterClassMap<TClass>(Action<BsonClassMap<TClass>>)
Registers a class map if it is not already registered.
- TryRegisterClassMap<TClass>(Func<BsonClassMap<TClass>>)
Registers a class map if it is not already registered.
- Unmap
Constructor(Constructor Info) Removes a creator map for a constructor from the class map.
- Unmap
Factory Method(Method Info) Removes a creator map for a factory method from the class map.
- Unmap
Field(string) Removes the member map for a field from the class map.
- Unmap
Member(Member Info) Removes a member map from the class map.
- Unmap
Property(string) Removes the member map for a property from the class map.