Click or drag to resize

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.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public static bool TryRegisterClassMap<TClass>(
	Func<BsonClassMap<TClass>> classMapFactory
)

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: Boolean
True if this call registered the class map, false if the class map was already registered.
See Also