Class ZeroIdChecker

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Bson.Serialization.IdGenerators

Assembly

MongoDB.Bson.dll

Represents an Id generator that only checks that the Id is not all zeros.

public class ZeroIdChecker<T> : IIdGenerator where T : struct, IEquatable<T>

Type Parameters

T

The type of the Id.

Inheritance

ZeroIdChecker

Implements

Inherited Members

Extension Methods

Constructors

ZeroIdChecker()

Initializes a new instance of the ZeroIdChecker class.

Methods

GenerateId(object, object)

Generates an Id for a document.

IsEmpty(object)

Tests whether an Id is empty.