Skip to content

AskNumberOptions<T>

Options for AskNumberAsync<T>(IReplInteractionChannel, string, string, T?, AskNumberOptions<T>?).

public record AskNumberOptions<T> : IEquatable<AskNumberOptions<T>> where T : struct
  • T: The numeric type.
  • IEquatable<AskNumberOptions<T>>

AskNumberOptions(TimeSpan?, T?, T?, CancellationToken)

Section titled “AskNumberOptions(TimeSpan?, T?, T?, CancellationToken)”

Options for AskNumberAsync<T>(IReplInteractionChannel, string, string, T?, AskNumberOptions<T>?).

public AskNumberOptions(TimeSpan? Timeout = null, T? Min = null, T? Max = null, CancellationToken CancellationToken = default)
  • Timeout (TimeSpan?): Optional timeout for the prompt.
  • Min (T?): Optional minimum bound (inclusive).
  • Max (T?): Optional maximum bound (inclusive).
  • CancellationToken (CancellationToken): Explicit cancellation token. When default, the channel uses the ambient per-command token set by the framework before each command dispatch.

Explicit cancellation token. When default, the channel uses the ambient per-command token set by the framework before each command dispatch.

public CancellationToken CancellationToken { get; init; }

CancellationToken

Optional maximum bound (inclusive).

public T? Max { get; init; }

T?

Optional minimum bound (inclusive).

public T? Min { get; init; }

T?

Optional timeout for the prompt.

public TimeSpan? Timeout { get; init; }

TimeSpan?