ข้ามไปยังเนื้อหา

Class SfidIdOptions

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Ids.Sfid.Configuration
Assembly: Cephalon.Ids.Sfid.dll

Describes the host-owned configuration used to bootstrap the official Sfid.Net generator.

public sealed class SfidIdOptions

objectSfidIdOptions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Initializes a new instance of the class.

public SfidIdOptions(int? datacenterId = null, int? workerId = null, int? workerCapacity = null, int? clockRegressionToleranceMilliseconds = null)

datacenterId int?

The datacenter identifier supplied to the generator.

workerId int?

The worker identifier supplied to the generator.

workerCapacity int?

The optional worker-capacity override supplied to the generator.

clockRegressionToleranceMilliseconds int?

The optional clock-regression tolerance, in milliseconds, supplied to the generator.

Gets the default configuration path used by the Sfid id-strategy pack.

public const string DefaultSectionPath = "Engine:Data:Ids:Sfid"

string

Gets the optional clock-regression tolerance, in milliseconds, supplied to the generator.

public int? ClockRegressionToleranceMilliseconds { get; set; }

int?

Gets the datacenter identifier supplied to the generator.

public int? DatacenterId { get; set; }

int?

Gets an empty options instance.

public static SfidIdOptions Empty { get; }

SfidIdOptions

Gets a value indicating whether any explicit Sfid-generator inputs were supplied.

public bool HasValues { get; }

bool

Gets the optional worker-capacity override supplied to the generator.

public int? WorkerCapacity { get; set; }

int?

Gets the worker identifier supplied to the generator.

public int? WorkerId { get; set; }

int?

FromConfiguration(IConfiguration?, string)

Section titled “ FromConfiguration(IConfiguration?, string)”

Reads Sfid id-strategy options from configuration.

public static SfidIdOptions FromConfiguration(IConfiguration? configuration, string sectionPath = "Engine:Data:Ids:Sfid")

configuration IConfiguration?

The configuration root to read.

sectionPath string

The configuration path that contains the Sfid id-strategy settings. The default is Engine:Data:Ids:Sfid.

SfidIdOptions

The parsed options.