Table of Contents

Class BsonCreatorMap

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

Represents a mapping to a delegate and its arguments.

public class BsonCreatorMap
Inheritance
BsonCreatorMap
Inherited Members
Extension Methods

Constructors

BsonCreatorMap(BsonClassMap, MemberInfo, Delegate)

Initializes a new instance of the BsonCreatorMap class.

public BsonCreatorMap(BsonClassMap classMap, MemberInfo memberInfo, Delegate @delegate)

Parameters

classMap BsonClassMap

The class map.

memberInfo MemberInfo

The member info (null if none).

delegate Delegate

The delegate.

Properties

Arguments

Gets the arguments.

public IEnumerable<MemberInfo> Arguments { get; }

Property Value

IEnumerable<MemberInfo>

ClassMap

Gets the class map that this creator map belongs to.

public BsonClassMap ClassMap { get; }

Property Value

BsonClassMap

Delegate

Gets the delegeate

public Delegate Delegate { get; }

Property Value

Delegate

ElementNames

Gets the element names.

public IEnumerable<string> ElementNames { get; }

Property Value

IEnumerable<string>

MemberInfo

Gets the member info (null if none).

public MemberInfo MemberInfo { get; }

Property Value

MemberInfo

Methods

Freeze()

Freezes the creator map.

public void Freeze()

HasDefaultValue(string)

Gets whether there is a default value for a missing element.

public bool HasDefaultValue(string elementName)

Parameters

elementName string

The element name.

Returns

bool

True if there is a default value for element name; otherwise, false.

SetArguments(IEnumerable<MemberInfo>)

Sets the arguments for the creator map.

public BsonCreatorMap SetArguments(IEnumerable<MemberInfo> arguments)

Parameters

arguments IEnumerable<MemberInfo>

The arguments.

Returns

BsonCreatorMap

The creator map.

SetArguments(IEnumerable<string>)

Sets the arguments for the creator map.

public BsonCreatorMap SetArguments(IEnumerable<string> argumentNames)

Parameters

argumentNames IEnumerable<string>

The argument names.

Returns

BsonCreatorMap

The creator map.