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
NowDateTimeOffsetThe instant the operation was received, captured once per command so every value in it agrees.
TenantstringThe 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
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
Tenant
The portable tenant identifier: DefaultTenant for the default tenant, or a named tenant's identifier.
public string Tenant { get; init; }
Property Value
Methods
Deconstruct(out DateTimeOffset, out string)
public void Deconstruct(out DateTimeOffset Now, out string Tenant)
Parameters
NowDateTimeOffsetTenantstring
Equals(GenerationContext)
public bool Equals(GenerationContext other)
Parameters
otherGenerationContext
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(GenerationContext, GenerationContext)
public static bool operator ==(GenerationContext left, GenerationContext right)
Parameters
leftGenerationContextrightGenerationContext
Returns
operator !=(GenerationContext, GenerationContext)
public static bool operator !=(GenerationContext left, GenerationContext right)
Parameters
leftGenerationContextrightGenerationContext