public class TaskCompletionSource extends NetObject
.NET documentation at https://learn.microsoft.com/dotnet/api/System.Threading.Tasks.TaskCompletionSource
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
|
static java.lang.String |
assemblyShortName
Assembly name: System.Private.CoreLib
|
static java.lang.String |
className
Qualified class name: System.Threading.Tasks.TaskCompletionSource
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
TaskCompletionSource()
Initializes a new instance by invoking the .NET constructor.
|
TaskCompletionSource(NetObject state)
Initializes a new instance by invoking the .NET constructor.
|
TaskCompletionSource(NetObject state,
TaskCreationOptions creationOptions)
Initializes a new instance by invoking the .NET constructor.
|
TaskCompletionSource(java.lang.Object instance)
Internal constructor.
|
TaskCompletionSource(TaskCreationOptions creationOptions)
Initializes a new instance by invoking the .NET constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static TaskCompletionSource |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into TaskCompletionSource, a cast assert is made to check if types are compatible. |
java.lang.String |
getJCOAssemblyName()
Returns the full name of the assembly of the .NET type.
|
java.lang.String |
getJCOClassName()
Returns the full name of the .NET type.
|
java.lang.Object |
getJCOInstance()
Returns the underlying object managed by the bridge.
|
java.lang.String |
getJCOObjectName()
Returns the name of the .NET type qualified with its assembly.
|
JCType |
getJCOType()
Returns the
JCType of the .NET type. |
Task |
getTask()
Gets the value of the .NET property Task.
|
void |
SetCanceled()
Invokes the .NET member SetCanceled.
|
void |
SetCanceled(CancellationToken cancellationToken)
Invokes the .NET member SetCanceled.
|
void |
SetException(IEnumerable_1 exceptions)
Invokes the .NET member SetException.
|
void |
SetException(NetException exception)
Invokes the .NET member SetException.
|
void |
SetFromTask(Task completedTask)
Invokes the .NET member SetFromTask.
|
void |
setJCOInstance(JCObject instance)
Sets the underlying object managed by the bridge.
|
void |
SetResult()
Invokes the .NET member SetResult.
|
boolean |
TrySetCanceled()
Invokes the .NET member TrySetCanceled.
|
boolean |
TrySetCanceled(CancellationToken cancellationToken)
Invokes the .NET member TrySetCanceled.
|
boolean |
TrySetException(IEnumerable_1 exceptions)
Invokes the .NET member TrySetException.
|
boolean |
TrySetException(NetException exception)
Invokes the .NET member TrySetException.
|
boolean |
TrySetFromTask(Task completedTask)
Invokes the .NET member TrySetFromTask.
|
boolean |
TrySetResult()
Invokes the .NET member TrySetResult.
|
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public TaskCompletionSource()
throws java.lang.Throwable
java.lang.Throwable - if the .NET constructor failspublic TaskCompletionSource(NetObject state) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, NullReferenceException, ArgumentNullException
state - the argument of type NetObjectjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNullReferenceException - if the .NET member raises itArgumentNullException - if the .NET member raises itpublic TaskCompletionSource(NetObject state, TaskCreationOptions creationOptions) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, NullReferenceException
state - the argument of type NetObjectcreationOptions - the argument of type TaskCreationOptionsjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNullReferenceException - if the .NET member raises itpublic TaskCompletionSource(java.lang.Object instance)
throws java.lang.Throwable
instance - the underlying bridge object: it must be a JCObjectjava.lang.Throwable - if instance is not a JCObjectpublic TaskCompletionSource(TaskCreationOptions creationOptions) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, NullReferenceException, ArgumentNullException
creationOptions - the argument of type TaskCreationOptionsjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNullReferenceException - if the .NET member raises itArgumentNullException - if the .NET member raises itpublic static TaskCompletionSource cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into TaskCompletionSource, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedTaskCompletionSource instancejava.lang.Throwable - in case of error during cast operationpublic java.lang.String getJCOAssemblyName()
NetObjectgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectpublic java.lang.String getJCOClassName()
NetObjectgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectpublic java.lang.Object getJCOInstance()
NetObjectgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectnull if there is nonepublic java.lang.String getJCOObjectName()
NetObjectgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectpublic JCType getJCOType()
NetObjectJCType of the .NET type.getJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectpublic Task getTask() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic void SetCanceled()
throws java.lang.Throwable,
PlatformNotSupportedException,
NotSupportedException,
ArgumentException,
InvalidOperationException,
NullReferenceException
java.lang.Throwable - if the call fails in the bridge or in the CLRPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentException - if the .NET member raises itInvalidOperationException - if the .NET member raises itNullReferenceException - if the .NET member raises itpublic void SetCanceled(CancellationToken cancellationToken) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, InvalidOperationException, IndexOutOfRangeException
cancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic void SetException(IEnumerable_1 exceptions) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, NullReferenceException, IndexOutOfRangeException
exceptions - the argument of type IEnumerable_1java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itNullReferenceException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic void SetException(NetException exception) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, NullReferenceException, IndexOutOfRangeException
exception - the argument of type NetExceptionjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itNullReferenceException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic void SetFromTask(Task completedTask) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, NullReferenceException
completedTask - the argument of type Taskjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNullReferenceException - if the .NET member raises itpublic void setJCOInstance(JCObject instance)
NetObjectsetJCOInstance in class NetObjectinstance - the new underlying objectpublic void SetResult()
throws java.lang.Throwable,
PlatformNotSupportedException,
NullReferenceException,
NotSupportedException,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException
java.lang.Throwable - if the call fails in the bridge or in the CLRPlatformNotSupportedException - if the .NET member raises itNullReferenceException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itpublic boolean TrySetCanceled()
throws java.lang.Throwable,
PlatformNotSupportedException,
NotSupportedException,
ArgumentNullException,
ArgumentException,
ArgumentOutOfRangeException,
InvalidOperationException,
IndexOutOfRangeException
java.lang.Throwable - if the call fails in the bridge or in the CLRPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic boolean TrySetCanceled(CancellationToken cancellationToken) throws java.lang.Throwable, PlatformNotSupportedException, NullReferenceException, NotSupportedException, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, InvalidOperationException, IndexOutOfRangeException
cancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRPlatformNotSupportedException - if the .NET member raises itNullReferenceException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic boolean TrySetException(IEnumerable_1 exceptions) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ArgumentNullException, ObjectDisposedException, RankException, IndexOutOfRangeException, NullReferenceException
exceptions - the argument of type IEnumerable_1java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentNullException - if the .NET member raises itObjectDisposedException - if the .NET member raises itRankException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itNullReferenceException - if the .NET member raises itpublic boolean TrySetException(NetException exception) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ArgumentNullException, ObjectDisposedException, RankException, IndexOutOfRangeException, NullReferenceException
exception - the argument of type NetExceptionjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentNullException - if the .NET member raises itObjectDisposedException - if the .NET member raises itRankException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itNullReferenceException - if the .NET member raises itpublic boolean TrySetFromTask(Task completedTask) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, NullReferenceException, IndexOutOfRangeException
completedTask - the argument of type Taskjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itNullReferenceException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic boolean TrySetResult()
throws java.lang.Throwable,
PlatformNotSupportedException,
NullReferenceException,
NotSupportedException,
ArgumentOutOfRangeException,
ArgumentNullException,
IndexOutOfRangeException,
RankException,
ArgumentException,
ArrayTypeMismatchException,
InvalidOperationException
java.lang.Throwable - if the call fails in the bridge or in the CLRPlatformNotSupportedException - if the .NET member raises itNullReferenceException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itRankException - if the .NET member raises itArgumentException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itInvalidOperationException - if the .NET member raises it