BsonClassMapTryRegisterClassMapTClass Method (ActionBsonClassMapTClass) |
Registers a class map if it is not already registered.
Namespace:
MongoDB.Bson.Serialization
Assembly:
MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax public static bool TryRegisterClassMap<TClass>(
Action<BsonClassMap<TClass>> classMapInitializer
)
Public Shared Function TryRegisterClassMap(Of TClass) (
classMapInitializer As Action(Of BsonClassMap(Of TClass))
) As Boolean
static member TryRegisterClassMap :
classMapInitializer : Action<BsonClassMap<'TClass>> -> bool
Parameters
- classMapInitializer
- Type: SystemActionBsonClassMapTClass
The class map initializer (only called if the class map is not already registered).
Type Parameters
- TClass
- The class.
Return Value
Type:
BooleanTrue if this call registered the class map, false if the class map was already registered.
See Also