Table of Contents

Class CombGuidGenerator

Namespace
MongoDB.Bson.Serialization.IdGenerators
Assembly
MongoDB.Bson.dll

Represents an Id generator for Guids using the COMB algorithm.

public class CombGuidGenerator : IIdGenerator
Inheritance
CombGuidGenerator
Implements
Inherited Members
Extension Methods

Constructors

CombGuidGenerator()

Initializes a new instance of the CombGuidGenerator class.

public CombGuidGenerator()

Properties

Instance

Gets an instance of CombGuidGenerator.

public static CombGuidGenerator Instance { get; }

Property Value

CombGuidGenerator

Methods

GenerateId(object, object)

Generates an Id for a document.

public object GenerateId(object container, object document)

Parameters

container object

The container of the document (will be a MongoCollection when called from the C# driver).

document object

The document.

Returns

object

An Id.

IsEmpty(object)

Tests whether an Id is empty.

public bool IsEmpty(object id)

Parameters

id object

The Id.

Returns

bool

True if the Id is empty.

NewCombGuid(Guid, DateTime)

Create a new CombGuid from a given Guid and timestamp.

public Guid NewCombGuid(Guid guid, DateTime timestamp)

Parameters

guid Guid

The base Guid.

timestamp DateTime

The timestamp.

Returns

Guid

A new CombGuid created by combining the base Guid with the timestamp.