Show / Hide Table of Contents

Class CommandInterpreter.Builder

Represents builder of the interpreter.

Inheritance
object
CommandInterpreter.Builder
Implements
ISupplier<CommandInterpreter>
IFunctional<Func<CommandInterpreter>>
IResettable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotNext.Net.Cluster.Consensus.Raft.Commands
Assembly: DotNext.Net.Cluster.dll
Syntax
public sealed class CommandInterpreter.Builder : ISupplier<CommandInterpreter>, IFunctional<Func<CommandInterpreter>>, IResettable

Methods

| Edit this page View Source

Add<TCommand>(Func<TCommand, object?, CancellationToken, ValueTask>)

Registers command handler.

Declaration
public CommandInterpreter.Builder Add<TCommand>(Func<TCommand, object?, CancellationToken, ValueTask> handler) where TCommand : ICommand<TCommand>
Parameters
Type Name Description
Func<TCommand, object, CancellationToken, ValueTask> handler

The command handler.

Returns
Type Description
CommandInterpreter.Builder

This builder.

Type Parameters
Name Description
TCommand

The type of the command supported by the handler.

Exceptions
Type Condition
ArgumentNullException

handler is null.

| Edit this page View Source

Add<TCommand>(Func<TCommand, CancellationToken, ValueTask>)

Registers command handler.

Declaration
public CommandInterpreter.Builder Add<TCommand>(Func<TCommand, CancellationToken, ValueTask> handler) where TCommand : ICommand<TCommand>
Parameters
Type Name Description
Func<TCommand, CancellationToken, ValueTask> handler

The command handler.

Returns
Type Description
CommandInterpreter.Builder

This builder.

Type Parameters
Name Description
TCommand

The type of the command supported by the handler.

Exceptions
Type Condition
ArgumentNullException

handler is null.

| Edit this page View Source

Build()

Constructs an instance of CommandInterpreter.

Declaration
public CommandInterpreter Build()
Returns
Type Description
CommandInterpreter

A new instance of the interpreter.

| Edit this page View Source

Reset()

Clears this builder so it can be reused.

Declaration
public void Reset()

Implements

ISupplier<TResult>
IFunctional<TDelegate>
IResettable

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.GetUserData<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
ExpressionBuilder.Const<T>(T)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan, CancellationToken)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾