Class CapabilityGrantRequestBinding
- Namespace
- AsiBackbone.AspNetCore.CapabilityGrants
- Assembly
- AsiBackbone.AspNetCore.dll
Represents the resource binding a request requires of a capability grant.
public sealed class CapabilityGrantRequestBinding
- Inheritance
-
CapabilityGrantRequestBinding
- Inherited Members
Properties
FailureMessage
Gets a message describing why the request could not be bound, when it could not.
public string? FailureMessage { get; }
Property Value
IsAvailable
Gets a value indicating whether the request could be bound.
public bool IsAvailable { get; }
Property Value
None
Gets a binding stating that the request has no bound resource.
public static CapabilityGrantRequestBinding None { get; }
Property Value
Value
Gets the binding value the grant must carry, or null when the request has no bound resource.
public string? Value { get; }
Property Value
Methods
Bound(string)
Creates a binding the grant's resource binding must equal.
public static CapabilityGrantRequestBinding Bound(string value)
Parameters
valuestringThe binding value.
Returns
- CapabilityGrantRequestBinding
The binding.
Exceptions
- ArgumentException
valueis null, empty, or whitespace.
Unavailable(string)
Creates a result stating that the request cannot be bound, which denies it.
public static CapabilityGrantRequestBinding Unavailable(string failureMessage)
Parameters
failureMessagestringA message describing why the request cannot be bound. It must not contain request content.
Returns
- CapabilityGrantRequestBinding
The unavailable binding.
Exceptions
- ArgumentException
failureMessageis null, empty, or whitespace.