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
FailureMessage
Gets the provider-neutral failure message when the use-control check did not accept the grant.
public string? FailureMessage { get; }
Property Value
IsAccepted
Gets a value indicating whether the grant was accepted for use.
public bool IsAccepted { get; }
Property Value
State
Gets the use-control state.
public GrantUseState State { get; }
Property Value
UseCount
Gets the observed use count after the store checked or consumed the grant.
public int UseCount { get; }
Property Value
Methods
Accepted(int)
Creates an accepted use result.
public static CapabilityGrantUseResult Accepted(int useCount)
Parameters
useCountint
Returns
Cancelled(string?)
Creates a result indicating the grant was cancelled.
public static CapabilityGrantUseResult Cancelled(string? failureMessage = null)
Parameters
failureMessagestring
Returns
Stopped(string?)
Creates a result indicating the grant was administratively stopped.
public static CapabilityGrantUseResult Stopped(string? failureMessage = null)
Parameters
failureMessagestring
Returns
Unavailable(string?)
Creates a result indicating the use-control store was unavailable.
public static CapabilityGrantUseResult Unavailable(string? failureMessage = null)
Parameters
failureMessagestring
Returns
UseLimitExceeded(int, string?)
Creates a result indicating the configured use limit was exceeded.
public static CapabilityGrantUseResult UseLimitExceeded(int useCount, string? failureMessage = null)