Table of Contents

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

string

IsAvailable

Gets a value indicating whether the request could be bound.

public bool IsAvailable { get; }

Property Value

bool

None

Gets a binding stating that the request has no bound resource.

public static CapabilityGrantRequestBinding None { get; }

Property Value

CapabilityGrantRequestBinding

Value

Gets the binding value the grant must carry, or null when the request has no bound resource.

public string? Value { get; }

Property Value

string

Methods

Bound(string)

Creates a binding the grant's resource binding must equal.

public static CapabilityGrantRequestBinding Bound(string value)

Parameters

value string

The binding value.

Returns

CapabilityGrantRequestBinding

The binding.

Exceptions

ArgumentException

value is 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

failureMessage string

A message describing why the request cannot be bound. It must not contain request content.

Returns

CapabilityGrantRequestBinding

The unavailable binding.

Exceptions

ArgumentException

failureMessage is null, empty, or whitespace.