Table of Contents

Class ParameterPreconditionAttribute

Namespace
Fluxer.Net.Commands
Assembly
Fluxer.Net.dll

Requires the parameter to pass the specified precondition before execution can begin.

[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = true)]
public abstract class ParameterPreconditionAttribute : Attribute
Inheritance
object
Attribute
ParameterPreconditionAttribute

Methods

CheckPermissionsAsync(ICommandContext, ParameterInfo, object, IServiceProvider)

Checks whether the condition is met before execution of the command.

public abstract Task<PreconditionResult> CheckPermissionsAsync(ICommandContext context, ParameterInfo parameter, object value, IServiceProvider services)

Parameters

context ICommandContext

The context of the command.

parameter ParameterInfo

The parameter of the command being checked against.

value object

The raw value of the parameter.

services IServiceProvider

The service collection used for dependency injection.

Returns

Task<PreconditionResult>

See Also