namespace JD.Threading.Dispatch { public abstract class Dispatcher { #region Properties /// /// Internal. /// public abstract IThreadDispatchStrategy Strategy { get; } #endregion #region Methods /// /// Dispatches the given synchronously. /// public void Dispatch(System.Action action) { Strategy.Dispatch(action); } /// /// Dispatches the given asynchronously, if possible. Otherwise, dispatch it synchronously. /// public void DispatchAsync(System.Action action, bool forceAsync = false) { Strategy.DispatchAsync(action, forceAsync); } #endregion } }