Class Dispatcher
Provides access to UI dispatcher of currently running application.
Inheritance
System.Object
Dispatcher
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: TcOpen.Inxton.Threading
Assembly: TcOpen.Inxton.Abstractions.dll
Syntax
public class Dispatcher : IDispatcher
Constructors
| Improve this Doc View SourceDispatcher()
Declaration
Dispatcher()
Fields
| Improve this Doc View Source_dispatcher
Declaration
static IDispatcher _dispatcher
Field Value
Type | Description |
---|---|
IDispatcher |
mutex
Declaration
static volatile object mutex
Field Value
Type | Description |
---|---|
System.Object |
Properties
| Improve this Doc View SourceGet
Gets dispatcher mediator of currently running application.
Declaration
public static IDispatcher Get { get; }
Property Value
Type | Description |
---|---|
IDispatcher |
Methods
| Improve this Doc View SourceInvoke(Action)
Invokes an action on the UI dispatcher of the currently running application. The appropriate dispatcher must be set at the start of the application. To set dispatcher use SetDispatcher(IDispatcher) method.
Declaration
public void Invoke(Action action)
Parameters
Type | Name | Description |
---|---|---|
System.Action | action | Action to run. |
InvokeAsync(Action)
Declaration
public Task InvokeAsync(Action action)
Parameters
Type | Name | Description |
---|---|---|
System.Action | action |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetDispatcher(IDispatcher)
Sets the dispatcher for running application.
Declaration
public static void SetDispatcher(IDispatcher dispatcher)
Parameters
Type | Name | Description |
---|---|---|
IDispatcher | dispatcher |