StoreDispatcher.md
February 25, 2024 · View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS
StoreDispatcher Class
Contains methods to dispatch execution of System.Action's or System.Func<>'s to the main thread.
public static class StoreDispatcher
Inheritance System.Object 🡒 StoreDispatcher
Remarks
These methods are required to access an EntityStore as instances of this class are not thread safe. Note: This file may be moved to project: Friflo.Engine.ECS Method mapping for various UI application libraries.
- AvaloniaUI - methods map to
Avalonia.Threading.Dispatcher.UIThreadmethods. - MAUI - methods map to
Microsoft.Maui.ApplicationModel.MainThreadmethods. - WinForms - methods map to
System.Windows.Threading.Dispatchermethods.
| Methods | |
|---|---|
| AssertMainThread() | |
| Invoke<TResult>(Func<TResult>) | |
| InvokeAsync(Func<Task>) | |
| InvokeAsync<TResult>(Func<Task<TResult>>) | |
| Post(Action) | |
| SetDispatcher(IStoreDispatcher) |