Class NamedExtraElementsMemberConvention
- Namespace
- MongoDB.Bson.Serialization.Conventions
- Assembly
- MongoDB.Bson.dll
A convention that finds the extra elements member by name (and that is also of type BsonDocument or IDictionary<TKey, TValue>).
public class NamedExtraElementsMemberConvention : ConventionBase, IClassMapConvention, IConvention
- Inheritance
-
NamedExtraElementsMemberConvention
- Implements
- Inherited Members
- Extension Methods
Constructors
NamedExtraElementsMemberConvention(IEnumerable<string>)
Initializes a new instance of the NamedExtraElementsMemberConvention class.
public NamedExtraElementsMemberConvention(IEnumerable<string> names)
Parameters
namesIEnumerable<string>The names.
NamedExtraElementsMemberConvention(IEnumerable<string>, BindingFlags)
Initializes a new instance of the NamedExtraElementsMemberConvention class.
public NamedExtraElementsMemberConvention(IEnumerable<string> names, BindingFlags bindingFlags)
Parameters
namesIEnumerable<string>The names.
bindingFlagsBindingFlagsThe binding flags.
NamedExtraElementsMemberConvention(IEnumerable<string>, MemberTypes)
Initializes a new instance of the NamedExtraElementsMemberConvention class.
public NamedExtraElementsMemberConvention(IEnumerable<string> names, MemberTypes memberTypes)
Parameters
namesIEnumerable<string>The names.
memberTypesMemberTypesThe member types.
NamedExtraElementsMemberConvention(IEnumerable<string>, MemberTypes, BindingFlags)
Initializes a new instance of the NamedExtraElementsMemberConvention class.
public NamedExtraElementsMemberConvention(IEnumerable<string> names, MemberTypes memberTypes, BindingFlags bindingFlags)
Parameters
namesIEnumerable<string>The names.
memberTypesMemberTypesThe member types.
bindingFlagsBindingFlagsThe binding flags.
Exceptions
NamedExtraElementsMemberConvention(string)
Initializes a new instance of the NamedExtraElementsMemberConvention class.
public NamedExtraElementsMemberConvention(string name)
Parameters
namestringThe name of the extra elements member.
Methods
Apply(BsonClassMap)
Applies a modification to the class map.
public void Apply(BsonClassMap classMap)
Parameters
classMapBsonClassMapThe class map.