Class Task
- Namespace
- Gio
- Assembly
- Gio-2.0.dll
public class Task : Object, AsyncResult, NativeObject, IDisposable, GTypeProvider, InstanceFactory
- Inheritance
-
Task
- Implements
- Inherited Members
Constructors
Task(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public Task(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
Task(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Task(CreationData data)
Parameters
dataCreationData
Task(TaskHandle)
protected Task(TaskHandle handle)
Parameters
handleTaskHandle
Fields
CompletedPropertyDefinition
public static readonly Property<bool, Task> CompletedPropertyDefinition
Field Value
Properties
Completed
public bool Completed { get; }
Property Value
Methods
GetCancellable()
[Version("2.36")]
public Cancellable? GetCancellable()
Returns
GetCheckCancellable()
[Version("2.36")]
public bool GetCheckCancellable()
Returns
GetCompleted()
[Version("2.44")]
public bool GetCompleted()
Returns
GetContext()
[Version("2.36")]
public MainContext GetContext()
Returns
GetGType()
public static Type GetGType()
Returns
GetName()
[Version("2.60")]
public string? GetName()
Returns
GetPriority()
[Version("2.36")]
public int GetPriority()
Returns
GetReturnOnCancel()
[Version("2.36")]
public bool GetReturnOnCancel()
Returns
GetSourceObject()
[Version("2.36")]
public Object? GetSourceObject()
Returns
GetSourceTag()
[Version("2.36")]
public nint GetSourceTag()
Returns
GetTaskData()
[Version("2.36")]
public nint GetTaskData()
Returns
HadError()
[Version("2.36")]
public bool HadError()
Returns
IsTagged(nint)
[Version("2.34")]
public bool IsTagged(nint sourceTag)
Parameters
sourceTagnint
Returns
IsValid(AsyncResult, Object?)
[Version("2.36")]
public static bool IsValid(AsyncResult result, Object? sourceObject)
Parameters
resultAsyncResultsourceObjectObject
Returns
LegacyPropagateError()
[Version("2.34")]
public bool LegacyPropagateError()
Returns
NewFromPointer(nint, bool)
Creates a new managed Task instance for a given pointer.
public static Task NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new Task and sets the properties specified by the construct arguments.
public static Task NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
PropagateBoolean()
[Version("2.36")]
public bool PropagateBoolean()
Returns
PropagateInt()
[Version("2.36")]
public nint PropagateInt()
Returns
PropagatePointer()
[Version("2.36")]
public nint PropagatePointer()
Returns
PropagateValue(out Value)
[Version("2.64")]
public bool PropagateValue(out Value value)
Parameters
valueValue
Returns
ReturnBoolean(bool)
[Version("2.36")]
public void ReturnBoolean(bool result)
Parameters
resultbool
ReturnError(Error)
[Version("2.36")]
public void ReturnError(Error error)
Parameters
errorError
ReturnErrorIfCancelled()
[Version("2.36")]
public bool ReturnErrorIfCancelled()
Returns
ReturnInt(nint)
[Version("2.36")]
public void ReturnInt(nint result)
Parameters
resultnint
ReturnNewErrorLiteral(Quark, int, string)
[Version("2.80")]
public void ReturnNewErrorLiteral(Quark domain, int code, string message)
Parameters
ReturnValue(Value?)
[Version("2.64")]
public void ReturnValue(Value? result)
Parameters
resultValue
SetCheckCancellable(bool)
[Version("2.36")]
public void SetCheckCancellable(bool checkCancellable)
Parameters
checkCancellablebool
SetName(string?)
[Version("2.60")]
public void SetName(string? name)
Parameters
namestring
SetPriority(int)
[Version("2.36")]
public void SetPriority(int priority)
Parameters
priorityint
SetReturnOnCancel(bool)
[Version("2.36")]
public bool SetReturnOnCancel(bool returnOnCancel)
Parameters
returnOnCancelbool
Returns
SetSourceTag(nint)
[Version("2.36")]
public void SetSourceTag(nint sourceTag)
Parameters
sourceTagnint
SetStaticName(string?)
[Version("2.76")]
public void SetStaticName(string? name)
Parameters
namestring