C# Class MongoDB.Bson.Serialization.IdGenerators.GuidGenerator

Represents an Id generator for Guids.
Inheritance: IIdGenerator
Datei anzeigen Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Public Methods

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

Generates an Id for a document.

GuidGenerator ( ) : System

Initializes a new instance of the GuidGenerator class.

IsEmpty ( object id ) : bool

Tests whether an Id is empty.

Method Details

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

GuidGenerator() public method

Initializes a new instance of the GuidGenerator class.
public GuidGenerator ( ) : System
return System

IsEmpty() public method

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