AsyncConfigBase Class

Represents the base class for configuration of possibly asynchronous and multi-threaded operations.
See the Examples section of the AsyncHelper class for details.

Definition

Namespace: KGySoft.Threading
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.2.0
C#
public abstract class AsyncConfigBase
Inheritance
Object    AsyncConfigBase
Derived

Constructors

AsyncConfigBaseInitializes a new instance of the AsyncConfigBase class

Properties

MaxDegreeOfParallelism Gets or sets the maximum degree of parallelism. Zero or less means an automatic configuration based on CPU cores. Set one to execute the operation on a single core. The asynchronous operation will not be blocking even if 1 is set.
Default value: 0.
Progress Gets or sets an IAsyncProgress instance that can handle progress notifications.
Default value: .
See the Examples section of the IAsyncProgress interface for an example implementation.
State Gets or sets a user-provided object that will be returned by the AsyncState property that can be used to distinguish this particular asynchronous operation from other ones. This object will be returned also in the IAsyncContext.State property created by the methods of the AsyncHelper class.
Default value: .
ThrowIfCanceled Gets or sets whether an OperationCanceledException should be thrown when ending or awaiting a canceled async operation. If the value of this property is , then canceled non-void operations will return some value, which is usually the default value of their return type.
Default value: .

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