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
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
IsCompleted
If the command was executed or timed out.
public bool IsCompleted { get; }
Property Value
IsDisconnected
If the user disconnected before the timeout.
public bool IsDisconnected { get; }
Property Value
IsSuccessfullyExecuted
If the command was executed.
public bool IsSuccessfullyExecuted { get; }
Property Value
IsTimedOut
If the command timed out.
public bool IsTimedOut { get; }
Property Value
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
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
continuationActionThe action to invoke when the operation completes.
Exceptions
- ArgumentNullException
The
continuationargument 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
continuationActionThe action to invoke when the operation completes.
Exceptions
- ArgumentNullException
The
continuationargument is null (Nothing in Visual Basic).