protected virtual void OnStateChanging(IState state) { if (StateChanging != null) { StateChanging.Invoke(this, new StateEventArgs(state)); } }
protected override void OnStateChanged(TaskState oldValue, TaskState newValue) { TaskDebug.Verbose($"TA: Task[{Label}] State Changing: {oldValue} -> {newValue}"); StateChanging?.Invoke(this, new PropertyUpdateEventArgs <TaskState>(nameof(ITask.State), oldValue, newValue)); TaskDebug.Verbose($"TA: Task[{Label}] State Changed: {oldValue} -> {newValue}"); base.OnStateChanged(oldValue, newValue); }
private void SetIsStateChanging(bool isStartedStateChange) { if (IsStateChanging == isStartedStateChange) { return; } IsStateChanging = isStartedStateChange; if (isStartedStateChange) { StateChanging?.Invoke(); } else { StateChanged?.Invoke(); } }
/// <summary> /// Raises the <see cref="E:StateChanging" /> event. /// </summary> /// <param name="e">The <see cref="StateChangingEventArgs{TState}" /> instance containing the event data.</param> protected void OnStateChanging(StateChangingEventArgs <TState> e) { StateChanging?.Invoke(this, e); }
//--------------------------------------------------------------------- private void _onStateChanging(T oldState, T newState) { StateChanging?.Invoke(this, new StateEventArgs <T>(oldState, newState)); }
/// <summary> /// Commit all the operations of a transaction into the database. /// All cursors opened within the transaction will be closed by this call. /// The cursors and transaction handle will be freed and must not be used again after this call. /// </summary> public MDBResultCode Commit() { State = LightningTransactionState.Commited; StateChanging?.Invoke(State); return(mdb_txn_commit(_handle)); }
private void _stateMachineOnStateChanging(object sender, StateEventArgs <ConnectorState> e) { StateChanging?.Invoke(this, e); }
protected virtual void OnStateChanging(object sender, PortState e) { StateChanging?.Invoke(sender, e); }
protected virtual void EndedPrint() => StateChanging?.Invoke(this, new PrinterEventArgs(this, "Ended"));