Table of Contents

Class NullIdChecker

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

Represents an Id generator that only checks that the Id is not null.

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

Constructors

NullIdChecker()

Initializes a new instance of the NullIdChecker class.

public NullIdChecker()

Properties

Instance

Gets an instance of NullIdChecker.

public static NullIdChecker Instance { get; }

Property Value

NullIdChecker

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.