public static void TryActionIgnoreException(DoAction action) { try { action.Invoke(); } catch { } }
internal void ActiveMenu() { if (DoAction == null) { DoWhenChosen(); } else { DoAction.Invoke(); } }
void onTimedEvent(object source, ElapsedEventArgs e) { double difference = DateTime.Now.Subtract(_zeroHour).TotalMilliseconds; if ((difference <= _TIMERPERIODINSECOND) && (difference > 0)) { lock (this) { if (_actionTimer.Enabled) { _actionTimer.Enabled = false; if (DoAction != null) { DoAction.Invoke(this, null); } _actionTimer.Enabled = true; } } } }
public void DoClick(Encounter encounter) { action.Invoke(encounter); }
public string ExecAction(string action) => DoAction?.Invoke(action) ?? null;
internal void OnAction(DbAnimationEventArgs e) { DoAction?.Invoke(this, e); }
private void DoConcreteWork(TSource currentWcfClient) { DoAction.Invoke(currentWcfClient, someObject); }
protected override void OnClick(EventArgs e) { Action?.Invoke(); // null propogation, no need for if statements. base.OnClick(e); }
/// <summary> /// 현재 작업을 실행합니다. /// </summary> public virtual void Do() { moved++; DoAction?.Invoke(); }