Table of Contents

Class CapabilityGrantUseResult

Namespace
AsiBackbone.Core.CapabilityTokens
Assembly
AsiBackbone.Core.dll

Represents the outcome returned by a capability grant use-control store.

public sealed class CapabilityGrantUseResult
Inheritance
CapabilityGrantUseResult
Inherited Members

Properties

FailureCode

Gets the provider-neutral failure code when the use-control check did not accept the grant.

public string? FailureCode { get; }

Property Value

string

FailureMessage

Gets the provider-neutral failure message when the use-control check did not accept the grant.

public string? FailureMessage { get; }

Property Value

string

IsAccepted

Gets a value indicating whether the grant was accepted for use.

public bool IsAccepted { get; }

Property Value

bool

State

Gets the use-control state.

public GrantUseState State { get; }

Property Value

GrantUseState

UseCount

Gets the observed use count after the store checked or consumed the grant.

public int UseCount { get; }

Property Value

int

Methods

Accepted(int)

Creates an accepted use result.

public static CapabilityGrantUseResult Accepted(int useCount)

Parameters

useCount int

Returns

CapabilityGrantUseResult

Cancelled(string?)

Creates a result indicating the grant was cancelled.

public static CapabilityGrantUseResult Cancelled(string? failureMessage = null)

Parameters

failureMessage string

Returns

CapabilityGrantUseResult

Stopped(string?)

Creates a result indicating the grant was administratively stopped.

public static CapabilityGrantUseResult Stopped(string? failureMessage = null)

Parameters

failureMessage string

Returns

CapabilityGrantUseResult

Unavailable(string?)

Creates a result indicating the use-control store was unavailable.

public static CapabilityGrantUseResult Unavailable(string? failureMessage = null)

Parameters

failureMessage string

Returns

CapabilityGrantUseResult

UseLimitExceeded(int, string?)

Creates a result indicating the configured use limit was exceeded.

public static CapabilityGrantUseResult UseLimitExceeded(int useCount, string? failureMessage = null)

Parameters

useCount int
failureMessage string

Returns

CapabilityGrantUseResult