C# Class MongoDBIntIdGenerator.IntIdGeneratorBase

Base class for id generator based on integer values.
Inheritance: IIdGenerator
ファイルを表示 Open project: alexjamesbrown/MongDBIntIdGenerator

Public Methods

Method Description
GenerateId ( object container, object document ) : object

Generates an Id for a document.

IsEmpty ( object id ) : bool

Tests whether an Id is empty.

Protected Methods

Method Description
ConvertToInt ( BsonValue value ) : object

Converts to int.

CreateUpdateBuilder ( ) : MongoDB.Driver.Builders.UpdateBuilder

Creates the update builder.

IntIdGeneratorBase ( ) : System

Initializes a new instance of the MongoDBIntIdGenerator.IntIdGeneratorBase class.

IntIdGeneratorBase ( string idCollectionName ) : System

Initializes a new instance of the MongoDBIntIdGenerator.IntIdGeneratorBase class.

Method Details

ConvertToInt() protected abstract method

Converts to int.
protected abstract ConvertToInt ( BsonValue value ) : object
value BsonValue Value.
return object

CreateUpdateBuilder() protected abstract method

Creates the update builder.
protected abstract CreateUpdateBuilder ( ) : MongoDB.Driver.Builders.UpdateBuilder
return MongoDB.Driver.Builders.UpdateBuilder

GenerateId() public method

Generates an Id for a document.
public GenerateId ( object container, object document ) : object
container object The container of the document (will be a MongoCollection when called from the C# driver).
document object The document.
return object

IntIdGeneratorBase() protected method

Initializes a new instance of the MongoDBIntIdGenerator.IntIdGeneratorBase class.
protected IntIdGeneratorBase ( ) : System
return System

IntIdGeneratorBase() protected method

Initializes a new instance of the MongoDBIntIdGenerator.IntIdGeneratorBase class.
protected IntIdGeneratorBase ( string idCollectionName ) : System
idCollectionName string Identifier collection name.
return System

IsEmpty() public abstract method

Tests whether an Id is empty.
public abstract IsEmpty ( object id ) : bool
id object The Id.
return bool