addType static method
Implementation
static void addType(Type type, BsonConstructor constructor, int uniqueId) {
if (_repository.containsKey(type)) {
throw ArgumentError(
'Type $type already defined in the Object repository');
}
_repository[type] = constructor;
if (_repositoryId.containsKey(uniqueId)) {
throw ArgumentError('UniqueId $uniqueId already defined '
'for Type "${_repositoryId[uniqueId]}"');
}
_repositoryId[uniqueId] = type;
_repositoryType[type] = uniqueId;
}