Class TaskPoolGlobalHookOptions
Represents options for TaskPoolGlobalHook.
Inherited Members
Namespace: SharpHook
Assembly: SharpHook.dll
Syntax
public sealed class TaskPoolGlobalHookOptions
Constructors
| Improve this Doc View SourceTaskPoolGlobalHookOptions(Boolean)
Initializes a new instance of TaskPoolGlobalHookOptions.
Declaration
public TaskPoolGlobalHookOptions(bool runAsyncOnBackgroundThread)
Parameters
Type | Name | Description |
---|---|---|
Boolean | runAsyncOnBackgroundThread | true if RunAsync() should run the hook on a background thread. Otherwise, false. |
TaskPoolGlobalHookOptions(Int32)
Initializes a new instance of TaskPoolGlobalHookOptions.
Declaration
public TaskPoolGlobalHookOptions(int parallelismLevel)
Parameters
Type | Name | Description |
---|---|---|
Int32 | parallelismLevel | The parallelism level of the event handlers. |
TaskPoolGlobalHookOptions(Int32, Boolean)
Initializes a new instance of TaskPoolGlobalHookOptions.
Declaration
public TaskPoolGlobalHookOptions(int parallelismLevel, bool runAsyncOnBackgroundThread)
Parameters
Type | Name | Description |
---|---|---|
Int32 | parallelismLevel | The parallelism level of the event handlers. |
Boolean | runAsyncOnBackgroundThread | true if RunAsync() should run the hook on a background thread. Otherwise, false. |
Fields
| Improve this Doc View SourceSequential
The default options with the parallelism level of 1.
Declaration
public static readonly TaskPoolGlobalHookOptions Sequential
Field Value
Type | Description |
---|---|
TaskPoolGlobalHookOptions | The options with the parallelism level of 1. |
Properties
| Improve this Doc View SourceParallelismLevel
Gets the configured parallelism level of the event handlers.
Declaration
public int ParallelismLevel { get; }
Property Value
Type | Description |
---|---|
Int32 | The parallelism level of the event handlers. |
RunAsyncOnBackgroundThread
Gets the value of whether RunAsync() should run the hook on a background thread.
Declaration
public bool RunAsyncOnBackgroundThread { get; }
Property Value
Type | Description |
---|---|
Boolean | true if RunAsync() should run the hook on a background thread. Otherwise, false. |