C# Класс CSMongo.MongoOid

Represents an ID number to use for MongoOids
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
MongoOidByteLength int

Открытые методы

Метод Описание
Generate ( ) : byte[]

Generates the bytes for a new MongoOid

GetId ( ) : string

Returns a string version of this ID

MongoOid ( ) : System

Creates a new Oid and generates an Oid automatically

MongoOid ( byte identifier ) : System

Creates an new Oid with the provided bytes - Must be 12 bytes long

MongoOid ( string id ) : System

Creates an ID using a string version of the Oid

SetId ( byte value ) : void

Sets the ID to a specific value using a set of bytes

SetId ( string value ) : void

Converts a string into an ID - IDs should be a hexadecimal string that is either 35 characters (with hyphens) or 24 characters without

ToString ( ) : string

Returns the string format of the Oid

Приватные методы

Метод Описание
_GetIdentifier ( ) : int

Описание методов

Generate() публичный статический Метод

Generates the bytes for a new MongoOid
public static Generate ( ) : byte[]
Результат byte[]

GetId() публичный Метод

Returns a string version of this ID
public GetId ( ) : string
Результат string

MongoOid() публичный Метод

Creates a new Oid and generates an Oid automatically
public MongoOid ( ) : System
Результат System

MongoOid() публичный Метод

Creates an new Oid with the provided bytes - Must be 12 bytes long
public MongoOid ( byte identifier ) : System
identifier byte
Результат System

MongoOid() публичный Метод

Creates an ID using a string version of the Oid
public MongoOid ( string id ) : System
id string
Результат System

SetId() публичный Метод

Sets the ID to a specific value using a set of bytes
public SetId ( byte value ) : void
value byte
Результат void

SetId() публичный Метод

Converts a string into an ID - IDs should be a hexadecimal string that is either 35 characters (with hyphens) or 24 characters without
public SetId ( string value ) : void
value string
Результат void

ToString() публичный Метод

Returns the string format of the Oid
public ToString ( ) : string
Результат string

Описание свойств

MongoOidByteLength публичное статическое свойство

The number of bytes to expect from a MongoOid
public static int MongoOidByteLength
Результат int