Class BsonConstructorAttribute
- Namespace
- MongoDB.Bson.Serialization.Attributes
- Assembly
- MongoDB.Bson.dll
Specifies that this constructor should be used for creator-based deserialization.
[AttributeUsage(AttributeTargets.Constructor)]
public class BsonConstructorAttribute : Attribute, IBsonCreatorMapAttribute
- Inheritance
-
BsonConstructorAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
BsonConstructorAttribute()
Initializes a new instance of the BsonConstructorAttribute class.
public BsonConstructorAttribute()
BsonConstructorAttribute(params string[])
Initializes a new instance of the BsonConstructorAttribute class.
public BsonConstructorAttribute(params string[] argumentNames)
Parameters
argumentNames
string[]The names of the members that the creator argument values come from.
Properties
ArgumentNames
Gets the names of the members that the creator arguments values come from.
public string[] ArgumentNames { get; }
Property Value
- string[]
Methods
Apply(BsonCreatorMap)
Applies a modification to the creator map.
public void Apply(BsonCreatorMap creatorMap)
Parameters
creatorMap
BsonCreatorMapThe creator map.