Class ConventionRegistry
- Namespace
- MongoDB.Bson.Serialization.Conventions
- Assembly
- MongoDB.Bson.dll
Represents a registry of conventions.
public static class ConventionRegistry
- Inheritance
-
ConventionRegistry
- Inherited Members
Methods
Lookup(Type)
Looks up the effective set of conventions that apply to a type.
public static IConventionPack Lookup(Type type)
Parameters
type
TypeThe type.
Returns
- IConventionPack
The conventions for that type.
Register(string, IConventionPack, Func<Type, bool>)
Registers the conventions.
public static void Register(string name, IConventionPack conventions, Func<Type, bool> filter)
Parameters
name
stringThe name.
conventions
IConventionPackThe conventions.
filter
Func<Type, bool>The filter.
Remove(string)
Removes the conventions specified by the given name.
public static void Remove(string name)
Parameters
name
stringThe name.
Remarks
Removing a convention allows the removal of the special defaults conventions and the attributes conventions for those who want to completely customize the experience.