public sealed class StaTaskScheduler : TaskScheduler,
IDisposable
Public NotInheritable Class StaTaskScheduler
Inherits TaskScheduler
Implements IDisposable
public ref class StaTaskScheduler sealed : public TaskScheduler,
IDisposable
[<SealedAttribute>]
type StaTaskScheduler =
class
inherit TaskScheduler
interface IDisposable
end
StaTaskScheduler | Initializes a new instance of the StaTaskScheduler class with the specified concurrency level. |
Default | Default task scheduler to use with STA threads. Can't be disposed. |
Id | Gets the unique ID for this TaskScheduler. (Унаследован от TaskScheduler) |
MaximumConcurrencyLevel |
Gets the maximum concurrency level supported by this scheduler.
(Переопределяет TaskSchedulerMaximumConcurrencyLevel) |
Dispose | Cleans up the scheduler by indicating that no more tasks will be queued. This method blocks until all threads successfully shutdown. |
Equals | Determines whether the specified object is equal to the current object. (Унаследован от Object) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Унаследован от Object) |
GetHashCode | Serves as the default hash function. (Унаследован от Object) |
GetScheduledTasks |
Provides a list of the scheduled tasks for the debugger to consume.
(Переопределяет TaskSchedulerGetScheduledTasks) |
GetType | Gets the Type of the current instance. (Унаследован от Object) |
MemberwiseClone | Creates a shallow copy of the current Object. (Унаследован от Object) |
QueueTask |
Queues a Task to be executed by this scheduler.
(Переопределяет TaskSchedulerQueueTask(Task)) |
ToString | Returns a string that represents the current object. (Унаследован от Object) |
TryDequeue | Attempts to dequeue a Task that was previously queued to this scheduler. (Унаследован от TaskScheduler) |
TryExecuteTask | Attempts to execute the provided Task on this scheduler. (Унаследован от TaskScheduler) |
TryExecuteTaskInline |
Determines whether a Task may be inlined.
(Переопределяет TaskSchedulerTryExecuteTaskInline(Task, Boolean)) |
FromCurrentSynchronizationContextSafe |
Возвращает диспетчер асинхронных задач из текущего контекста синхронизации.
Метод аналогичен вызову TaskScheduler.FromCurrentSynchronizationContext()
за тем исключением, что при отсутствии текущего контекста синхронизации
будет возвращён диспетчер currentScheduler.
Контекст может отсутствовать в консольных приложениях и в Unit-тестах.
Пример использования: TaskScheduler.Current.FromCurrentSynchronizationContextSafe().
(Определяется PlatformExtensions) |
Get | (Определяется ComHelper) |
Invoke | (Определяется ComHelper) |
Set | (Определяется ComHelper) |