Table of Contents

Class BsonFactoryMethodAttribute

Namespace
MongoDB.Bson.Serialization.Attributes
Assembly
MongoDB.Bson.dll

Specifies that this factory method should be used for creator-based deserialization.

[AttributeUsage(AttributeTargets.Method)]
public class BsonFactoryMethodAttribute : Attribute, IBsonCreatorMapAttribute
Inheritance
BsonFactoryMethodAttribute
Implements
Inherited Members
Extension Methods

Constructors

BsonFactoryMethodAttribute()

Initializes a new instance of the BsonFactoryMethodAttribute class.

public BsonFactoryMethodAttribute()

BsonFactoryMethodAttribute(params string[])

Initializes a new instance of the BsonFactoryMethodAttribute class.

public BsonFactoryMethodAttribute(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 BsonCreatorMap

The creator map.