StringIdStoredAsObjectIdConvention Class (original) (raw)
A convention that sets the representation of a string id class member to ObjectId in BSON with a StringObjectIdGenerator. This convention is only responsible for setting the serializer and idGenerator. It is assumed that this convention runs after other conventions that identify which member is the _id and that the _id has already been added to the class map.
Inheritance Hierarchy
Namespace: MongoDB.Bson.Serialization.Conventions
Assembly: MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed
Syntax
public class StringIdStoredAsObjectIdConvention : ConventionBase, IMemberMapConvention, IConvention
Public Class StringIdStoredAsObjectIdConvention Inherits ConventionBase Implements IMemberMapConvention, IConvention
type StringIdStoredAsObjectIdConvention =
class
inherit ConventionBase
interface IMemberMapConvention
interface IConvention
end
The StringIdStoredAsObjectIdConvention type exposes the following members.
Constructors
Properties
Methods
| | Name | Description | |
| ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| | Apply | Applies a modification to the member map. |
|
| 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.) |
|
| GetHashCode | Serves as the default hash function. (Inherited from Object.) |
|
| GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
Extension Methods
See Also