Table of Contents

Class AcknowledgmentChallengeResult

Namespace
AsiBackbone.AspNetCore.Acknowledgments
Assembly
AsiBackbone.AspNetCore.dll

Represents the result of handling a host-submitted acknowledgment challenge response.

public sealed class AcknowledgmentChallengeResult
Inheritance
AcknowledgmentChallengeResult
Inherited Members

Properties

Acknowledged

Gets a value indicating whether the response was accepted by the actor.

public bool Acknowledged { get; }

Property Value

bool

Acknowledgment

Gets the Core acknowledgment response when one was created.

public AcknowledgmentResponse? Acknowledgment { get; }

Property Value

AcknowledgmentResponse

CanProceed

Gets a value indicating whether the operation that required acknowledgment may continue.

public bool CanProceed { get; }

Property Value

bool

Remarks

This is true only when the response was handled successfully and the actor accepted. A handled refusal and every handling failure yield false. It is the single check a host should gate the consequential operation on, matching CanProceed.

Rejected

Gets a value indicating whether the response was rejected by the actor.

public bool Rejected { get; }

Property Value

bool

Result

Gets the operation result describing response handling success or failure.

public OperationResult Result { get; }

Property Value

OperationResult

Succeeded

Gets a value indicating whether the response was handled successfully.

public bool Succeeded { get; }

Property Value

bool

Remarks

This reports only that the response was valid and produced an acknowledgment record. It is true when the actor explicitly declined, because a refusal is recorded as a AcknowledgmentResponse just like an acceptance. Do not use it to decide whether the operation may continue; use CanProceed instead.

Methods

Failure(string, string)

Creates a failed acknowledgment challenge result.

public static AcknowledgmentChallengeResult Failure(string code, string message)

Parameters

code string

The failure reason code.

message string

The failure reason message.

Returns

AcknowledgmentChallengeResult

A failed challenge result.

Success(AcknowledgmentResponse)

Creates a successful acknowledgment challenge result.

public static AcknowledgmentChallengeResult Success(AcknowledgmentResponse acknowledgment)

Parameters

acknowledgment AcknowledgmentResponse

The Core acknowledgment response.

Returns

AcknowledgmentChallengeResult

A successful challenge result.