9 [__DynamicallyInvokable]
10 [HostProtection(
SecurityAction.LinkDemand, Synchronization =
true, ExternalThreading =
true)]
17 [__DynamicallyInvokable]
20 [__DynamicallyInvokable]
28 [__DynamicallyInvokable]
37 [__DynamicallyInvokable]
39 : this((object)null, creationOptions)
45 [__DynamicallyInvokable]
55 [__DynamicallyInvokable]
61 private void SpinUntilCompleted()
64 while (!m_task.IsCompleted)
75 [__DynamicallyInvokable]
78 if (exception ==
null)
82 bool flag = m_task.TrySetException(exception);
83 if (!flag && !m_task.IsCompleted)
96 [__DynamicallyInvokable]
99 if (exceptions ==
null)
104 foreach (
Exception exception
in exceptions)
106 if (exception ==
null)
116 bool flag = m_task.TrySetException(list);
117 if (!flag && !m_task.IsCompleted)
119 SpinUntilCompleted();
126 bool flag = m_task.TrySetException(exceptions);
127 if (!flag && !m_task.IsCompleted)
129 SpinUntilCompleted();
139 [__DynamicallyInvokable]
142 if (exception ==
null)
158 [__DynamicallyInvokable]
170 [__DynamicallyInvokable]
173 bool flag = m_task.TrySetResult(result);
174 if (!flag && !m_task.IsCompleted)
176 SpinUntilCompleted();
185 [__DynamicallyInvokable]
196 [__DynamicallyInvokable]
206 [__DynamicallyInvokable]
209 bool flag = m_task.TrySetCanceled(cancellationToken);
210 if (!flag && !m_task.IsCompleted)
212 SpinUntilCompleted();
219 [__DynamicallyInvokable]
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Propagates notification that operations should be canceled.
bool TrySetException(IEnumerable< Exception > exceptions)
Attempts to transition the underlying T:System.Threading.Tasks.Task`1 into the F:System....
Provides support for spin-based waiting.
No initialization action.
void SetResult(TResult result)
Transitions the underlying T:System.Threading.Tasks.Task`1 into the F:System.Threading....
Exposes the enumerator, which supports a simple iteration over a collection of a specified type....
TaskCreationOptions
Specifies flags that control optional behavior for the creation and execution of tasks.
void SetCanceled()
Transitions the underlying T:System.Threading.Tasks.Task`1 into the F:System.Threading....
SecurityAction
Specifies the security actions that can be performed using declarative security.
Provides information about, and means to manipulate, the current environment and platform....
bool TrySetResult(TResult result)
Attempts to transition the underlying T:System.Threading.Tasks.Task`1 into the F:System....
bool TrySetException(Exception exception)
Attempts to transition the underlying T:System.Threading.Tasks.Task`1 into the F:System....
void SetException(IEnumerable< Exception > exceptions)
Transitions the underlying T:System.Threading.Tasks.Task`1 into the F:System.Threading....
bool TrySetCanceled(CancellationToken cancellationToken)
Attempts to transition the underlying T:System.Threading.Tasks.Task`1 into the F:System....
Represents the producer side of a T:System.Threading.Tasks.Task`1 unbound to a delegate,...
The exception that is thrown when one of the arguments provided to a method is not valid.
TaskCompletionSource(TaskCreationOptions creationOptions)
Creates a T:System.Threading.Tasks.TaskCompletionSource`1 with the specified options.
TaskCompletionSource(object state)
Creates a T:System.Threading.Tasks.TaskCompletionSource`1 with the specified state.
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
TaskCompletionSource()
Creates a T:System.Threading.Tasks.TaskCompletionSource`1.
void SpinOnce()
Performs a single spin.
The exception that is thrown when a method call is invalid for the object's current state.
bool TrySetCanceled()
Attempts to transition the underlying T:System.Threading.Tasks.Task`1 into the F:System....
TaskCompletionSource(object state, TaskCreationOptions creationOptions)
Creates a T:System.Threading.Tasks.TaskCompletionSource`1 with the specified state and options.
Represents an asynchronous operation that can return a value.
void SetException(Exception exception)
Transitions the underlying T:System.Threading.Tasks.Task`1 into the F:System.Threading....