// This will be called from a different Thread, therefore post it to the main thread! public void Notify_AlarmOrEvent(AdapterAlarmOrEvent eventInfo, Adapter adapter) { moduleThread.Post(Do_Notify_AlarmOrEvent, eventInfo, adapter); }
// This will be called from a different Thread, therefore post it to the main thread! public void Notify_NeedRestart(string reason, Adapter adapter) { moduleThread.Post(Do_Notify_NeedRestart, reason, adapter); }
private void Do_Notify_NeedRestart(string reason, Adapter adapter) { AdapterState ast = adapters.FirstOrDefault(a => a.Config.ID == adapter.ID); Task ignored = RestartAdapterOrCrash(ast, reason); }
public Wrapper(Module m, Adapter a) { this.m = m; this.a = a; }