public static bool CheckAccessOrInvoke <T1, T2>(this JasilyDispatcher dispatcher, Action <T1, T2> action, T1 t1, T2 t2) { if (dispatcher.CheckAccess()) { return(true); } dispatcher.Invoke(() => action(t1, t2)); return(false); }
public static bool CheckAccessOrInvoke(this JasilyDispatcher dispatcher, Action action) { if (dispatcher.CheckAccess()) { return(true); } dispatcher.Invoke(action); return(false); }