Struct GenerationContext

Namespace
Cratis.Concepts
Assembly
Cratis.Fundamentals.dll

Carries the operation's captured time and portable tenant identifier for value generation.

public readonly struct GenerationContext : IEquatable<GenerationContext>
Implements
Inherited Members
Extension Methods

Constructors

GenerationContext(DateTimeOffset, string)

Carries the operation's captured time and portable tenant identifier for value generation.

public GenerationContext(DateTimeOffset Now, string Tenant)

Parameters

Now DateTimeOffset

The instant the operation was received, captured once per command so every value in it agrees.

Tenant string

The portable tenant identifier: DefaultTenant for the default tenant, or a named tenant's identifier.

Fields

DefaultTenant

The zero-GUID identifier of the default tenant.

public const string DefaultTenant = "00000000-0000-0000-0000-000000000000"

Field Value

string

Properties

Now

The instant the operation was received, captured once per command so every value in it agrees.

public DateTimeOffset Now { get; init; }

Property Value

DateTimeOffset

Tenant

The portable tenant identifier: DefaultTenant for the default tenant, or a named tenant's identifier.

public string Tenant { get; init; }

Property Value

string

Methods

Deconstruct(out DateTimeOffset, out string)

public void Deconstruct(out DateTimeOffset Now, out string Tenant)

Parameters

Now DateTimeOffset
Tenant string

Equals(GenerationContext)

public bool Equals(GenerationContext other)

Parameters

other GenerationContext

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(GenerationContext, GenerationContext)

public static bool operator ==(GenerationContext left, GenerationContext right)

Parameters

left GenerationContext
right GenerationContext

Returns

bool

operator !=(GenerationContext, GenerationContext)

public static bool operator !=(GenerationContext left, GenerationContext right)

Parameters

left GenerationContext
right GenerationContext

Returns

bool