Table of Contents

Class CommandWaitTask.CommandWaitAwaiter

Namespace
Uncreated.Warfare.Interaction.Commands
Assembly
Uncreated.Warfare.dll
public class CommandWaitTask.CommandWaitAwaiter : ICriticalNotifyCompletion, INotifyCompletion, IDisposable
Inheritance
CommandWaitTask.CommandWaitAwaiter
Implements
Inherited Members

Properties

IsAborted

If the task was aborted before the timeout.

public bool IsAborted { get; }

Property Value

bool

Remarks

Always true if IsCancelled is true.

IsCancelled

If the task was cancelled using a CancellationToken before the timeout.

public bool IsCancelled { get; }

Property Value

bool

IsCompleted

If the command was executed or timed out.

public bool IsCompleted { get; }

Property Value

bool

IsDisconnected

If the user disconnected before the timeout.

public bool IsDisconnected { get; }

Property Value

bool

IsSuccessfullyExecuted

If the command was executed.

public bool IsSuccessfullyExecuted { get; }

Property Value

bool

IsTimedOut

If the command timed out.

public bool IsTimedOut { get; }

Property Value

bool

Remarks

Always true if IsDisconnected is true.

Methods

Dispose()

Dispose will be called after the command is executed so calling dispose manually usually isn't necessary.

public void Dispose()

GetResult()

Get info about the command execution after completion.

public CommandWaitResult GetResult()

Returns

CommandWaitResult

Exceptions

InvalidOperationException

Task not completed.

TimeoutException

Task timed out or user disconnected.

OperationCanceledException

Operation was aborted.

OnCompleted(Action)

Schedules the continuation action that's invoked when the instance completes.

public void OnCompleted(Action continuation)

Parameters

continuation Action

The action to invoke when the operation completes.

Exceptions

ArgumentNullException

The continuation argument is null (Nothing in Visual Basic).

UnsafeOnCompleted(Action)

Schedules the continuation action that's invoked when the instance completes.

public void UnsafeOnCompleted(Action continuation)

Parameters

continuation Action

The action to invoke when the operation completes.

Exceptions

ArgumentNullException

The continuation argument is null (Nothing in Visual Basic).