BsonClassMapTryRegisterClassMapTClass Method (FuncBsonClassMapTClass) |
Registers a class map if it is not already registered.
Namespace:
MongoDB.Bson.Serialization
Assembly:
MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax public static bool TryRegisterClassMap<TClass>(
Func<BsonClassMap<TClass>> classMapFactory
)
Public Shared Function TryRegisterClassMap(Of TClass) (
classMapFactory As Func(Of BsonClassMap(Of TClass))
) As Boolean
static member TryRegisterClassMap :
classMapFactory : Func<BsonClassMap<'TClass>> -> bool
Parameters
- classMapFactory
- Type: SystemFuncBsonClassMapTClass
The class map factory (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