Show / Hide Table of Contents

Class ThreadContextAwaiter<TResult>

Awaiter preserving the thread context.

Inheritance
System.Object
ThreadContextAwaiter<TResult>
Implements
System.Runtime.CompilerServices.ICriticalNotifyCompletion
System.Runtime.CompilerServices.INotifyCompletion
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Threading.Tasks
Assembly: Kephas.Core.dll
Syntax
public class ThreadContextAwaiter<TResult> : ICriticalNotifyCompletion, INotifyCompletion
Type Parameters
Name Description
TResult

Type of the result.

Constructors

| Improve this Doc View Source

ThreadContextAwaiter(Task<TResult>)

Initializes a new instance of the ThreadContextAwaiter<TResult> class.

Declaration
public ThreadContextAwaiter(Task<TResult> task)
Parameters
Type Name Description
System.Threading.Tasks.Task<TResult> task

The task.

Properties

| Improve this Doc View Source

IsCompleted

Gets a value indicating whether the awaiter is completed.

Declaration
public bool IsCompleted { get; }
Property Value
Type Description
System.Boolean

true if this object is completed, false if not.

Methods

| Improve this Doc View Source

GetAwaiter()

Gets this awaiter.

Declaration
public ThreadContextAwaiter<TResult> GetAwaiter()
Returns
Type Description
ThreadContextAwaiter<TResult>

The awaiter.

| Improve this Doc View Source

GetResult()

Notifies the awaiter to get the result.

Declaration
public TResult GetResult()
Returns
Type Description
TResult

The result returned by the task.

| Improve this Doc View Source

OnCompleted(Action)

Schedules the continuation action that's invoked when the instance completes.

Declaration
public void OnCompleted(Action continuation)
Parameters
Type Name Description
System.Action continuation

The action to invoke when the operation completes.

Exceptions
Type Condition
System.ArgumentNullException

The continuation argument is null (Nothing in Visual Basic).

| Improve this Doc View Source

UnsafeOnCompleted(Action)

Schedules the continuation action that's invoked when the instance completes.

Declaration
public void UnsafeOnCompleted(Action continuation)
Parameters
Type Name Description
System.Action continuation

The action to invoke when the operation completes.

Exceptions
Type Condition
System.ArgumentNullException

The continuation argument is null (Nothing in Visual Basic).

Implements

System.Runtime.CompilerServices.ICriticalNotifyCompletion
System.Runtime.CompilerServices.INotifyCompletion

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX