Bson |
public class BsonMapper
The BsonMapper type exposes the following members.
| Name | Description | |
|---|---|---|
| BsonMapper | Initializes a new instance of the BsonMapper class |
| Name | Description | |
|---|---|---|
| EmptyStringToNull | Convert EmptyString to Null (default true) | |
| EnumAsInteger | Get/Set if enum must be converted into Integer value. If false, enum will be converted into String value. MUST BE "true" to support LINQ expressions (default false) | |
| IncludeFields | Get/Set that mapper must include fields (default: false) | |
| IncludeNonPublic | Get/Set that mapper must include non public (private, protected and internal) (default: false) | |
| MaxDepth | Get/Set maximum depth for nested object (default 20) | |
| OnDeserialization | Gets called before deserialization of a value | |
| SerializeNullValues | Indicate that mapper do not serialize null values (default false) | |
| TrimWhitespace | Apply .Trim() in strings when serialize (default true) |
| Name | Description | |
|---|---|---|
| BuildEntityMapper | Use this method to override how your class can be, by default, mapped from entity to Bson document. Returns an EntityMapper from each requested Type | |
| Deserialize(Type, BsonValue) | Deserilize a BsonValue to .NET object based on type parameter | |
| DeserializeT(BsonValue) | Deserialize a BsonValue to .NET object typed in T | |
| EntityT | Map your entity class to BsonDocument using fluent API | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetExpressionT, K | Resolve LINQ expression into BsonExpression | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetIdMember | Gets MemberInfo that refers to Id from a document object. | |
| GetIndexExpressionT, K | Resolve LINQ expression into BsonExpression (for index only) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| GetTypeCtor | Get best construtor to use to initialize this entity. - Look if contains [BsonCtor] attribute - Look for parameterless ctor - Look for first contructor with parameter and use BsonDocument to send RawValue | |
| GetTypeMembers | Returns all member that will be have mapper between POCO class to document | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| RegisterType(Type, FuncObject, BsonValue, FuncBsonValue, Object) | Register a custom type serializer/deserialize function | |
| RegisterTypeT(FuncT, BsonValue, FuncBsonValue, T) | Register a custom type serializer/deserialize function | |
| Serialize(Type, Object) | Serialize to BsonValue any .NET object based on type parameter (using mapping rules) | |
| SerializeT(T) | Serialize to BsonValue any .NET object based on T type (using mapping rules) | |
| ToDocument(Type, Object) | Serialize a entity class to BsonDocument | |
| ToDocumentT(T) | Serialize a entity class to BsonDocument | |
| ToObject(Type, BsonDocument) | Deserialize a BsonDocument to entity class | |
| ToObjectT(BsonDocument) | Deserialize a BsonDocument to entity class | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| UseCamelCase | Use lower camel case resolution for convert property names to field names | |
| UseLowerCaseDelimiter | Uses lower camel case with delimiter to convert property names to field names |
| Name | Description | |
|---|---|---|
| Global | Global instance used when no BsonMapper are passed in LiteDatabase ctor | |
| ResolveCollectionName | Custom resolve name collection based on Type | |
| ResolveFieldName | A resolver name for field | |
| ResolveMember | A custom callback to change MemberInfo behavior when converting to MemberMapper. Use mapper.ResolveMember(Type entity, MemberInfo property, MemberMapper documentMappedField) Set FieldName to null if you want remove from mapped document |
| Name | Description | |
|---|---|---|
| MethodInvoke |
Calls the object method by name.
(Defined by ObjectEx) | |
| PropertyGet |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertyGetT |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertySet |
Sets the value of the object property by name.
(Defined by ObjectEx) |