Class GovernanceEmissionResult
- Namespace
- AsiBackbone.Core.Emissions
- Assembly
- AsiBackbone.Core.dll
Represents the provider-neutral result of a governance emission attempt.
public sealed class GovernanceEmissionResult
- Inheritance
-
GovernanceEmissionResult
- Inherited Members
Properties
Error
Gets provider-neutral error information, when the emission did not deliver successfully.
public GovernanceEmissionError? Error { get; }
Property Value
HasMetadata
Gets a value indicating whether result metadata is present.
public bool HasMetadata { get; }
Property Value
IsSuccess
Gets a value indicating whether the emission was delivered successfully.
public bool IsSuccess { get; }
Property Value
IsTerminal
Gets a value indicating whether the result is terminal and should not be retried automatically.
public bool IsTerminal { get; }
Property Value
Metadata
Gets minimized provider-neutral result metadata.
public IReadOnlyDictionary<string, string> Metadata { get; }
Property Value
ProviderName
Gets the provider name that handled or attempted the emission, when available.
public string? ProviderName { get; }
Property Value
ProviderRecordId
Gets the provider-side record identifier, when one is returned and safe to keep.
public string? ProviderRecordId { get; }
Property Value
RetryAfterUtc
Gets the UTC retry timestamp for deferred or retryable outcomes, when supplied.
public DateTimeOffset? RetryAfterUtc { get; }
Property Value
ShouldRetry
Gets a value indicating whether the emission should be retried according to provider-neutral status or error metadata.
public bool ShouldRetry { get; }
Property Value
Status
Gets the provider-neutral result status.
public GovernanceEmissionStatus Status { get; }
Property Value
Methods
DeadLettered(GovernanceEmissionError, string?, IReadOnlyDictionary<string, string>?)
Creates a dead-letter emission result.
public static GovernanceEmissionResult DeadLettered(GovernanceEmissionError error, string? providerName = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
errorGovernanceEmissionErrorproviderNamestringmetadataIReadOnlyDictionary<string, string>
Returns
Deferred(GovernanceEmissionError?, DateTimeOffset?, string?, IReadOnlyDictionary<string, string>?)
Creates a deferred emission result.
public static GovernanceEmissionResult Deferred(GovernanceEmissionError? error = null, DateTimeOffset? retryAfterUtc = null, string? providerName = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
errorGovernanceEmissionErrorretryAfterUtcDateTimeOffset?providerNamestringmetadataIReadOnlyDictionary<string, string>
Returns
Delivered(string?, string?, IReadOnlyDictionary<string, string>?)
Creates a delivered emission result.
public static GovernanceEmissionResult Delivered(string? providerName = null, string? providerRecordId = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
providerNamestringproviderRecordIdstringmetadataIReadOnlyDictionary<string, string>
Returns
Failed(GovernanceEmissionError, string?, IReadOnlyDictionary<string, string>?)
Creates a failed emission result.
public static GovernanceEmissionResult Failed(GovernanceEmissionError error, string? providerName = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
errorGovernanceEmissionErrorproviderNamestringmetadataIReadOnlyDictionary<string, string>
Returns
Pending(string?, IReadOnlyDictionary<string, string>?)
Creates a pending emission result.
public static GovernanceEmissionResult Pending(string? providerName = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
providerNamestringmetadataIReadOnlyDictionary<string, string>
Returns
RetryableFailure(GovernanceEmissionError, DateTimeOffset?, string?, IReadOnlyDictionary<string, string>?)
Creates a retryable failure emission result.
public static GovernanceEmissionResult RetryableFailure(GovernanceEmissionError error, DateTimeOffset? retryAfterUtc = null, string? providerName = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
errorGovernanceEmissionErrorretryAfterUtcDateTimeOffset?providerNamestringmetadataIReadOnlyDictionary<string, string>