Task

Overview

Task class that returns no value.

Location

Descendants

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Task()

 

init()

 

Task()

Await

Adds to this tasks await completion list, runs this interface when done, or returns true if it's already done.

 

method Await(aCompletion: IAwaitCompletion): Boolean

 

Boolean Await(IAwaitCompletion aCompletion)

 

func Await(_ aCompletion: IAwaitCompletion) -> Boolean

 

Boolean Await(IAwaitCompletion aCompletion)

Parameters:

  • aCompletion:

ConfigureAwait

Defines if awaiting this task should return to the current context or not.

 

method ConfigureAwait(aCaptureContext: Boolean): ConfiguredAwaitTask

 

ConfiguredAwaitTask ConfigureAwait(Boolean aCaptureContext)

 

func ConfigureAwait(_ aCaptureContext: Boolean) -> ConfiguredAwaitTask

 

ConfiguredAwaitTask ConfigureAwait(Boolean aCaptureContext)

Parameters:

  • aCaptureContext:

ContinueWith (Action<Task>): Task

Continue this task with the given callback when it's done.

 

method ContinueWith(aAction: Action<Task>): Task

 

Task ContinueWith(Action<Task> aAction)

 

func ContinueWith(_ aAction: Action<Task>) -> Task

 

Task ContinueWith(Action1<Task> aAction)

Parameters:

  • aAction:

ContinueWith (Action<Task, Object>, Object): Task

Continue this task with the given callback when it's done.

 

method ContinueWith(aAction: Action<Task, Object>; aState: Object): Task

 

Task ContinueWith(Action<Task, Object> aAction, Object aState)

 

func ContinueWith(_ aAction: Action<Task, Object>, _ aState: Object) -> Task

 

Task ContinueWith(Action2<Task, Object> aAction, Object aState)

Parameters:

  • aAction:
  • aState:

ContinueWith<T> (Func<Task, T>): Task<T>

Continue this task with the given callback when it's done.

 

method ContinueWith<T>(aAction: Func<Task, T>): Task<T>

 

Task<T> ContinueWith<T>(Func<Task, T> aAction)

 

func ContinueWith<T>(_ aAction: Func<Task, T>) -> Task<T>

 

Task<T> ContinueWith<T>(Func2<Task, T> aAction)

Parameters:

  • aAction:

ContinueWith<T> (Func<Task, Object, T>, Object): Task<T>

Continue this task with the given callback when it's done.

 

method ContinueWith<T>(aAction: Func<Task, Object, T>; aState: Object): Task<T>

 

Task<T> ContinueWith<T>(Func<Task, Object, T> aAction, Object aState)

 

func ContinueWith<T>(_ aAction: Func<Task, Object, T>, _ aState: Object) -> Task<T>

 

Task<T> ContinueWith<T>(Func3<Task, Object, T> aAction, Object aState)

Parameters:

  • aAction:
  • aState:

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Exception

Returns the exception that occurred.

 

property Exception: Exception read;

 

Exception Exception { get; }

 

var Exception: Exception { get{} }

 

Exception Exception { __get; }

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

IsCompleted

True if the task is done (or failed)

 

property IsCompleted: Boolean read;

 

Boolean IsCompleted { get; }

 

var IsCompleted: Boolean { get{} }

 

Boolean IsCompleted { __get; }

IsFaulted

Returns true if the task threw an exception.

 

property IsFaulted: Boolean read;

 

Boolean IsFaulted { get; }

 

var IsFaulted: Boolean { get{} }

 

Boolean IsFaulted { __get; }

IsStarted

Returns true if the task started.

 

property IsStarted: Boolean read;

 

Boolean IsStarted { get; }

 

var IsStarted: Boolean { get{} }

 

Boolean IsStarted { __get; }

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

Run (Action): Task

Runs the given callback and returns a task.

 

class method Run(aIn: Action): Task

 

static Task Run(Action aIn)

 

static func Run(_ aIn: Action) -> Task

 

static Task Run(Action aIn)

Parameters:

  • aIn:

Run (Action<Object>, Object): Task

Runs the given callback and returns a task.

 

class method Run(aIn: Action<Object>; aValue: Object): Task

 

static Task Run(Action<Object> aIn, Object aValue)

 

static func Run(_ aIn: Action<Object>, _ aValue: Object) -> Task

 

static Task Run(Action1<Object> aIn, Object aValue)

Parameters:

  • aIn:
  • aValue:

Run<T> (Func<T>): Task<T>

Runs the given callback and returns a task.

 

class method Run<T>(aIn: Func<T>): Task<T>

 

static Task<T> Run<T>(Func<T> aIn)

 

static func Run<T>(_ aIn: Func<T>) -> Task<T>

 

static Task<T> Run<T>(Func1<T> aIn)

Parameters:

  • aIn:

Run<T> (Func<Object, T>, Object): Task<T>

Runs the given callback and returns a task.

 

class method Run<T>(aIn: Func<Object, T>; aValue: Object): Task<T>

 

static Task<T> Run<T>(Func<Object, T> aIn, Object aValue)

 

static func Run<T>(_ aIn: Func<Object, T>, _ aValue: Object) -> Task<T>

 

static Task<T> Run<T>(Func2<Object, T> aIn, Object aValue)

Parameters:

  • aIn:
  • aValue:

RunSynchronous (Action): Task

Runs the given callback in the context of the caller and returns a task.

 

class method RunSynchronous(aIn: Action): Task

 

static Task RunSynchronous(Action aIn)

 

static func RunSynchronous(_ aIn: Action) -> Task

 

static Task RunSynchronous(Action aIn)

Parameters:

  • aIn:

RunSynchronous (Action<Object>, Object): Task

Runs the given callback in the context of the caller and returns a task.

 

class method RunSynchronous(aIn: Action<Object>; aValue: Object): Task

 

static Task RunSynchronous(Action<Object> aIn, Object aValue)

 

static func RunSynchronous(_ aIn: Action<Object>, _ aValue: Object) -> Task

 

static Task RunSynchronous(Action1<Object> aIn, Object aValue)

Parameters:

  • aIn:
  • aValue:

RunSynchronous<T> (Func<T>): Task<T>

Runs the given callback in the context of the caller and returns a task.

 

class method RunSynchronous<T>(aIn: Func<T>): Task<T>

 

static Task<T> RunSynchronous<T>(Func<T> aIn)

 

static func RunSynchronous<T>(_ aIn: Func<T>) -> Task<T>

 

static Task<T> RunSynchronous<T>(Func1<T> aIn)

Parameters:

  • aIn:

RunSynchronous<T> (Func<Object, T>, Object): Task<T>

Runs the given callback in the context of the caller and returns a task.

 

class method RunSynchronous<T>(aIn: Func<Object, T>; aValue: Object): Task<T>

 

static Task<T> RunSynchronous<T>(Func<Object, T> aIn, Object aValue)

 

static func RunSynchronous<T>(_ aIn: Func<Object, T>, _ aValue: Object) -> Task<T>

 

static Task<T> RunSynchronous<T>(Func2<Object, T> aIn, Object aValue)

Parameters:

  • aIn:
  • aValue:

Start

Starts this task.

 

method Start

 

void Start()

 

func Start()

 

void Start()

State

Returns the state of this task.

 

property State: TaskState read;

 

TaskState State { get; }

 

var State: TaskState { get{} }

 

TaskState State { __get; }

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

Wait  virtual

Waits for the task to finish.

 

method Wait

 

void Wait()

 

func Wait()

 

void Wait()

Wait (Int32): Boolean  virtual

Waits for the task to finish or timeout.

 

method Wait(aTimeoutMSec: Int32): Boolean

 

Boolean Wait(Int32 aTimeoutMSec)

 

func Wait(_ aTimeoutMSec: Int32) -> Boolean

 

Boolean Wait(Int32 aTimeoutMSec)

Parameters:

  • aTimeoutMSec:

 

Exception

Returns the exception that occurred.

 

property Exception: Exception read;

 

Exception Exception { get; }

 

var Exception: Exception { get{} }

 

Exception Exception { __get; }

IsCompleted

True if the task is done (or failed)

 

property IsCompleted: Boolean read;

 

Boolean IsCompleted { get; }

 

var IsCompleted: Boolean { get{} }

 

Boolean IsCompleted { __get; }

IsFaulted

Returns true if the task threw an exception.

 

property IsFaulted: Boolean read;

 

Boolean IsFaulted { get; }

 

var IsFaulted: Boolean { get{} }

 

Boolean IsFaulted { __get; }

IsStarted

Returns true if the task started.

 

property IsStarted: Boolean read;

 

Boolean IsStarted { get; }

 

var IsStarted: Boolean { get{} }

 

Boolean IsStarted { __get; }

State

Returns the state of this task.

 

property State: TaskState read;

 

TaskState State { get; }

 

var State: TaskState { get{} }

 

TaskState State { __get; }

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

Run (Action): Task

Runs the given callback and returns a task.

 

class method Run(aIn: Action): Task

 

static Task Run(Action aIn)

 

static func Run(_ aIn: Action) -> Task

 

static Task Run(Action aIn)

Parameters:

  • aIn:

Run (Action<Object>, Object): Task

Runs the given callback and returns a task.

 

class method Run(aIn: Action<Object>; aValue: Object): Task

 

static Task Run(Action<Object> aIn, Object aValue)

 

static func Run(_ aIn: Action<Object>, _ aValue: Object) -> Task

 

static Task Run(Action1<Object> aIn, Object aValue)

Parameters:

  • aIn:
  • aValue:

Run<T> (Func<T>): Task<T>

Runs the given callback and returns a task.

 

class method Run<T>(aIn: Func<T>): Task<T>

 

static Task<T> Run<T>(Func<T> aIn)

 

static func Run<T>(_ aIn: Func<T>) -> Task<T>

 

static Task<T> Run<T>(Func1<T> aIn)

Parameters:

  • aIn:

Run<T> (Func<Object, T>, Object): Task<T>

Runs the given callback and returns a task.

 

class method Run<T>(aIn: Func<Object, T>; aValue: Object): Task<T>

 

static Task<T> Run<T>(Func<Object, T> aIn, Object aValue)

 

static func Run<T>(_ aIn: Func<Object, T>, _ aValue: Object) -> Task<T>

 

static Task<T> Run<T>(Func2<Object, T> aIn, Object aValue)

Parameters:

  • aIn:
  • aValue:

RunSynchronous (Action): Task

Runs the given callback in the context of the caller and returns a task.

 

class method RunSynchronous(aIn: Action): Task

 

static Task RunSynchronous(Action aIn)

 

static func RunSynchronous(_ aIn: Action) -> Task

 

static Task RunSynchronous(Action aIn)

Parameters:

  • aIn:

RunSynchronous (Action<Object>, Object): Task

Runs the given callback in the context of the caller and returns a task.

 

class method RunSynchronous(aIn: Action<Object>; aValue: Object): Task

 

static Task RunSynchronous(Action<Object> aIn, Object aValue)

 

static func RunSynchronous(_ aIn: Action<Object>, _ aValue: Object) -> Task

 

static Task RunSynchronous(Action1<Object> aIn, Object aValue)

Parameters:

  • aIn:
  • aValue:

RunSynchronous<T> (Func<T>): Task<T>

Runs the given callback in the context of the caller and returns a task.

 

class method RunSynchronous<T>(aIn: Func<T>): Task<T>

 

static Task<T> RunSynchronous<T>(Func<T> aIn)

 

static func RunSynchronous<T>(_ aIn: Func<T>) -> Task<T>

 

static Task<T> RunSynchronous<T>(Func1<T> aIn)

Parameters:

  • aIn:

RunSynchronous<T> (Func<Object, T>, Object): Task<T>

Runs the given callback in the context of the caller and returns a task.

 

class method RunSynchronous<T>(aIn: Func<Object, T>; aValue: Object): Task<T>

 

static Task<T> RunSynchronous<T>(Func<Object, T> aIn, Object aValue)

 

static func RunSynchronous<T>(_ aIn: Func<Object, T>, _ aValue: Object) -> Task<T>

 

static Task<T> RunSynchronous<T>(Func2<Object, T> aIn, Object aValue)

Parameters:

  • aIn:
  • aValue:

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Task()

 

init()

 

Task()

Await

Adds to this tasks await completion list, runs this interface when done, or returns true if it's already done.

 

method Await(aCompletion: IAwaitCompletion): Boolean

 

Boolean Await(IAwaitCompletion aCompletion)

 

func Await(_ aCompletion: IAwaitCompletion) -> Boolean

 

Boolean Await(IAwaitCompletion aCompletion)

Parameters:

  • aCompletion:

ConfigureAwait

Defines if awaiting this task should return to the current context or not.

 

method ConfigureAwait(aCaptureContext: Boolean): ConfiguredAwaitTask

 

ConfiguredAwaitTask ConfigureAwait(Boolean aCaptureContext)

 

func ConfigureAwait(_ aCaptureContext: Boolean) -> ConfiguredAwaitTask

 

ConfiguredAwaitTask ConfigureAwait(Boolean aCaptureContext)

Parameters:

  • aCaptureContext:

ContinueWith (Action<Task>): Task

Continue this task with the given callback when it's done.

 

method ContinueWith(aAction: Action<Task>): Task

 

Task ContinueWith(Action<Task> aAction)

 

func ContinueWith(_ aAction: Action<Task>) -> Task

 

Task ContinueWith(Action1<Task> aAction)

Parameters:

  • aAction:

ContinueWith (Action<Task, Object>, Object): Task

Continue this task with the given callback when it's done.

 

method ContinueWith(aAction: Action<Task, Object>; aState: Object): Task

 

Task ContinueWith(Action<Task, Object> aAction, Object aState)

 

func ContinueWith(_ aAction: Action<Task, Object>, _ aState: Object) -> Task

 

Task ContinueWith(Action2<Task, Object> aAction, Object aState)

Parameters:

  • aAction:
  • aState:

ContinueWith<T> (Func<Task, T>): Task<T>

Continue this task with the given callback when it's done.

 

method ContinueWith<T>(aAction: Func<Task, T>): Task<T>

 

Task<T> ContinueWith<T>(Func<Task, T> aAction)

 

func ContinueWith<T>(_ aAction: Func<Task, T>) -> Task<T>

 

Task<T> ContinueWith<T>(Func2<Task, T> aAction)

Parameters:

  • aAction:

ContinueWith<T> (Func<Task, Object, T>, Object): Task<T>

Continue this task with the given callback when it's done.

 

method ContinueWith<T>(aAction: Func<Task, Object, T>; aState: Object): Task<T>

 

Task<T> ContinueWith<T>(Func<Task, Object, T> aAction, Object aState)

 

func ContinueWith<T>(_ aAction: Func<Task, Object, T>, _ aState: Object) -> Task<T>

 

Task<T> ContinueWith<T>(Func3<Task, Object, T> aAction, Object aState)

Parameters:

  • aAction:
  • aState:

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Start

Starts this task.

 

method Start

 

void Start()

 

func Start()

 

void Start()

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

Wait  virtual

Waits for the task to finish.

 

method Wait

 

void Wait()

 

func Wait()

 

void Wait()

Wait (Int32): Boolean  virtual

Waits for the task to finish or timeout.

 

method Wait(aTimeoutMSec: Int32): Boolean

 

Boolean Wait(Int32 aTimeoutMSec)

 

func Wait(_ aTimeoutMSec: Int32) -> Boolean

 

Boolean Wait(Int32 aTimeoutMSec)

Parameters:

  • aTimeoutMSec:

Descendants