TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class TaskVoid in Tinman.Core.Threading.Pooling

abstract class TaskVoid with <TInput>  
  implements ITaskVoid<TInput>
  extends TaskBase

Public / Attributes

Flags

The task flags.

public property Flags { get }
type TaskFlags
value The task flags.
inherited TaskBase.Flags

Group

The group this task belongs to.

public property Group { get set }
type TaskGroup
value The task group or null to use the default task group.
inherited TaskBase.Group

Name

Human-readable name of this task.

public property Name { get }
type string
value [not-null] The task name.
inherited TaskBase.Name

Remarks:

The name is primarily used for error reporting.

OnCancel

The task cancel delegate to use.

public property OnCancel { get set }
type TaskCancelDelegate<TInput>
value The task cancel delegate or null.
implements ITaskVoid.OnCancel

Remarks:

This is the default cancel delegate. It can optionally be overwritten when this task is scheduled.

OnException

The task exception delegate to use.

public property OnException { get set }
type TaskExceptionDelegate<TInput>
value The task exception delegate or null.
implements ITaskVoid.OnException

Remarks:

This is the default exception delegate. It can optionally be overwritten when this task is scheduled.

Public / Methods

PerformTask

Performs the actual task work.

public abstract method PerformTask (TInput input)
params input The input data.
returns The task output data object.
implements ITaskVoid.PerformTask

Schedule

Schedules this task for execution using the given input data.

[ThreadSafe]
public method Schedule (TInput input, TaskGroup group = null, TaskCancelDelegate<TInput> onCancel = null, TaskExceptionDelegate<TInput> onException = null)
type TaskResultVoid
params input The input data object.
  group Optional task group (will override Group if not null). Defaults to null.
  onCancel Optional delegate to call when the task is cancelled (will override OnCancel if not null). Defaults to null.
  onException Optional task exception callback delegate (will override OnException if not null). Defaults to null.
returns [not-null] The task result object.
implements ITaskVoid.Schedule

ScheduleNoResult

Schedules this task for execution using the given input data.

[ThreadSafe]
public method ScheduleNoResult (TInput input, TaskGroup group = null, TaskCancelDelegate<TInput> onCancel = null, TaskExceptionDelegate<TInput> onException = null)
params input The input data object.
  group Optional task group (will override Group if not null). Defaults to null.
  onCancel Optional delegate to call when the task is cancelled (will override OnCancel if not null). Defaults to null.
  onException Optional task exception callback delegate (will override OnException if not null). Defaults to null.
implements ITaskVoid.ScheduleNoResult

Wrap

Wraps the given task delegate method in a ITask object.

public static method Wrap (TaskDelegateVoid<TInput> method, string name = "unnamed-task", TaskFlags flags = TaskFlags.None, TaskGroup group = null, TaskCancelDelegate<TInput> onCancel = null, TaskExceptionDelegate<TInput> onException = null)
type ITaskVoid<TInput>
params method [not-null] The task delegate method.
  name [not-null] The task name. This is usually the name of the method pointed to by method, without the Task prefix.
  flags The task flags.
  group The default task group. Defaults to null.
  onCancel The default on cancel delegate. Defaults to null.
  onException The default on exception delegate. Defaults to null.
returns [not-null] The task object.

Protected / Constructors

TaskVoid

Creates a new instance of TaskVoid.

protected constructor TaskVoid (string name, TaskFlags flags)
params name [not-null] The task name.
  flags The task flags.