Show / Hide Table of Contents

Delegate AuthorizationCallback

Represents authorization rule.

Namespace: DotNext.Maintenance.CommandLine.Authorization
Assembly: DotNext.MaintenanceServices.dll
Syntax
public delegate ValueTask<bool> AuthorizationCallback(IPrincipal principal, CommandResult target, ITypeMap context, CancellationToken token)
Parameters
Type Name Description
IPrincipal principal

Authenticated user.

CommandResult target

The authorization target.

ITypeMap context

Maintenance session context.

CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
ValueTask<bool>

true if authorization passed successfully; otherwise, false.

Constructors

View Source

AuthorizationCallback(object, nint)

Declaration
public AuthorizationCallback(object @object, nint method)
Parameters
Type Name Description
object object
nint method

Methods

View Source

BeginInvoke(IPrincipal, CommandResult, ITypeMap, CancellationToken, AsyncCallback, object)

Declaration
public virtual IAsyncResult BeginInvoke(IPrincipal principal, CommandResult target, ITypeMap context, CancellationToken token, AsyncCallback callback, object @object)
Parameters
Type Name Description
IPrincipal principal
CommandResult target
ITypeMap context
CancellationToken token
AsyncCallback callback
object object
Returns
Type Description
IAsyncResult
View Source

EndInvoke(IAsyncResult)

Declaration
public virtual ValueTask<bool> EndInvoke(IAsyncResult result)
Parameters
Type Name Description
IAsyncResult result
Returns
Type Description
ValueTask<bool>
View Source

Invoke(IPrincipal, CommandResult, ITypeMap, CancellationToken)

Declaration
public virtual ValueTask<bool> Invoke(IPrincipal principal, CommandResult target, ITypeMap context, CancellationToken token)
Parameters
Type Name Description
IPrincipal principal
CommandResult target
ITypeMap context
CancellationToken token
Returns
Type Description
ValueTask<bool>

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
DelegateHelpers.ChangeType<TDelegate>(Delegate)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾