AsyncContextWrapper Class

Provides a wrapper of an existing IAsyncContext instance to override its MaxDegreeOfParallelism or to conceal its Progress.
See the Examples section of the AsyncHelper class for details about IAsyncContext.

Definition

Namespace: KGySoft.Threading
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public sealed class AsyncContextWrapper : IAsyncContext
Inheritance
Object    AsyncContextWrapper
Implements
IAsyncContext

Constructors

AsyncContextWrapper Initializes a new instance of the AsyncContextWrapper class with the provided parameters.

Properties

CanBeCanceled Gets whether this operation can be canceled.
IsCancellationRequested Gets whether the cancellation of the current operation has been requested.
MaxDegreeOfParallelism Gets the maximum degree of parallelism. If zero or less, then it is adjusted automatically.
Progress Gets an IAsyncProgress instance that can be used to report progress, or if no progress reporter belongs to the current operation.

Methods

Extension Methods

Convert Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions)
ConvertTTarget Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions)
In Gets whether item is among the elements of set.
See the Examples section of the generic InT(T, T) overload for an example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)

See Also