Class AuditResidueLifecycleEvent
- Namespace
- AsiBackbone.Core.Audit
- Assembly
- AsiBackbone.Core.dll
Represents a framework-neutral lifecycle event linked to a governed audit residue flow.
public sealed class AuditResidueLifecycleEvent
- Inheritance
-
AuditResidueLifecycleEvent
- Inherited Members
Remarks
Lifecycle events are append-only progress records. They allow acknowledgment, capability token, gateway, outbox, and provider delivery activity to be recorded without rewriting the original decision residue.
Properties
AuditResidueId
Gets the related audit residue identifier when the original decision residue is available.
public string? AuditResidueId { get; }
Property Value
CorrelationId
Gets the correlation identifier that links this lifecycle event to the original decision context.
public string CorrelationId { get; }
Property Value
EventId
Gets the stable identifier for this lifecycle event.
public string EventId { get; }
Property Value
HasAuditResidueId
Gets a value indicating whether this lifecycle event is linked to an audit residue identifier.
public bool HasAuditResidueId { get; }
Property Value
HasMetadata
Gets a value indicating whether this lifecycle event contains metadata.
public bool HasMetadata { get; }
Property Value
Metadata
Gets additional framework-neutral lifecycle metadata supplied by the host.
public IReadOnlyDictionary<string, string> Metadata { get; }
Property Value
OccurredUtc
Gets the UTC timestamp when the lifecycle event occurred.
public DateTimeOffset OccurredUtc { get; }
Property Value
OperationName
Gets the operation name associated with the lifecycle event, when supplied by the host or original residue.
public string? OperationName { get; }
Property Value
Outcome
Gets the decision, gateway, emission, or host-defined outcome associated with this lifecycle event, when supplied.
public string? Outcome { get; }
Property Value
Stage
Gets the lifecycle stage represented by this event.
public AuditResidueLifecycleStage Stage { get; }
Property Value
StageSequence
Gets the stable sequence value for this lifecycle stage.
public int StageSequence { get; }
Property Value
TraceId
Gets the trace identifier associated with the lifecycle event, when supplied by the host or original residue.
public string? TraceId { get; }
Property Value
Methods
Create(AuditResidueLifecycleStage, string, string?, string?, DateTimeOffset?, string?, string?, string?, IReadOnlyDictionary<string, string>?)
Creates an audit residue lifecycle event.
public static AuditResidueLifecycleEvent Create(AuditResidueLifecycleStage stage, string correlationId, string? auditResidueId = null, string? eventId = null, DateTimeOffset? occurredUtc = null, string? traceId = null, string? operationName = null, string? outcome = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
stageAuditResidueLifecycleStageThe lifecycle stage represented by this event.
correlationIdstringThe correlation identifier linking the event to the original decision context.
auditResidueIdstringOptional audit residue identifier when the original decision residue is available.
eventIdstringOptional lifecycle event identifier. When omitted, a new identifier is generated.
occurredUtcDateTimeOffset?Optional lifecycle timestamp. When omitted, the current UTC timestamp is used.
traceIdstringOptional trace identifier.
operationNamestringOptional operation name.
outcomestringOptional lifecycle or host-defined outcome.
metadataIReadOnlyDictionary<string, string>Optional host-provided lifecycle metadata.
Returns
- AuditResidueLifecycleEvent
An audit residue lifecycle event.
FromResidue(AuditResidueLifecycleStage, IAsiBackboneAuditResidue, string?, string?, string?, DateTimeOffset?, string?, IReadOnlyDictionary<string, string>?)
Creates an audit residue lifecycle event by copying correlation context from existing audit residue.
public static AuditResidueLifecycleEvent FromResidue(AuditResidueLifecycleStage stage, IAsiBackboneAuditResidue residue, string? correlationId = null, string? auditResidueId = null, string? eventId = null, DateTimeOffset? occurredUtc = null, string? outcome = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
stageAuditResidueLifecycleStageThe lifecycle stage represented by this event.
residueIAsiBackboneAuditResidueThe original audit residue to correlate with the lifecycle event.
correlationIdstringOptional correlation identifier override. When omitted, the residue correlation identifier is used.
auditResidueIdstringOptional audit residue identifier override. When omitted, the residue event identifier is used.
eventIdstringOptional lifecycle event identifier. When omitted, a new identifier is generated.
occurredUtcDateTimeOffset?Optional lifecycle timestamp. When omitted, the current UTC timestamp is used.
outcomestringOptional lifecycle or host-defined outcome. When omitted, the residue outcome is used.
metadataIReadOnlyDictionary<string, string>Optional host-provided lifecycle metadata merged after residue metadata.
Returns
- AuditResidueLifecycleEvent
An audit residue lifecycle event.