C# Class Microsoft.Identity.Client.StaTaskScheduler

Provides a scheduler that uses STA threads.
Inheritance: System.Threading.Tasks.TaskScheduler, IDisposable
Show file Open project: AzureAD/microsoft-authentication-library-for-dotnet Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Cleans up the scheduler by indicating that no more tasks will be queued. This method blocks until all threads successfully shutdown.

StaTaskScheduler ( int numberOfThreads ) : System

Initializes a new instance of the StaTaskScheduler class with the specified concurrency level.

Protected Methods

Method Description
GetScheduledTasks ( ) : IEnumerable

Provides a list of the scheduled tasks for the debugger to consume.

QueueTask ( Task task ) : void

Queues a Task to be executed by this scheduler.

TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool

Determines whether a Task may be inlined.

Method Details

Dispose() public method

Cleans up the scheduler by indicating that no more tasks will be queued. This method blocks until all threads successfully shutdown.
public Dispose ( ) : void
return void

GetScheduledTasks() protected method

Provides a list of the scheduled tasks for the debugger to consume.
protected GetScheduledTasks ( ) : IEnumerable
return IEnumerable

QueueTask() protected method

Queues a Task to be executed by this scheduler.
protected QueueTask ( Task task ) : void
task Task The task to be executed.
return void

StaTaskScheduler() public method

Initializes a new instance of the StaTaskScheduler class with the specified concurrency level.
public StaTaskScheduler ( int numberOfThreads ) : System
numberOfThreads int The number of threads that should be created and used by this scheduler.
return System

TryExecuteTaskInline() protected method

Determines whether a Task may be inlined.
protected TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool
task Task The task to be executed.
taskWasPreviouslyQueued bool Whether the task was previously queued.
return bool