private void Update() { if (Input.GetMouseButtonDown(0)) { MainAction?.Invoke(); } if (Input.GetKeyDown(KeyCode.Escape)) { Escape?.Invoke(); } if (Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.KeypadEnter)) { InteractAction?.Invoke(); } if (Input.GetKeyDown(KeyCode.Alpha1)) { SetActiveSlot?.Invoke(1); } if (Input.GetKeyDown(KeyCode.Alpha2)) { SetActiveSlot?.Invoke(2); } if (Input.GetKeyDown(KeyCode.BackQuote)) { ToggleAnimVisibility?.Invoke(); } }
private void Jitting() { SetupAction?.Invoke(); MainAction.Invoke(1); IdleAction.Invoke(1); CleanupAction?.Invoke(); }
public void Jitting() { // first signal about jitting is raised from auto-generated Program.cs, look at BenchmarkProgram.txt MainAction.Invoke(1); IdleAction.Invoke(1); isJitted = true; }
public bool DoActionTransacted() { bool isSuccess = false; TransactionScope transaction = null; try { transaction = new TransactionScope(); Inforamtion = Transaction.Current.TransactionInformation; AttachEventHandler(); MainAction.Invoke(); } catch (Exception e) { Transaction.Current.Rollback(); } finally { if (Transaction.Current != null && Transaction.Current.TransactionInformation.Status != TransactionStatus.Aborted) { transaction.Complete(); transaction.Dispose(); transaction = null; isSuccess = true; } } return(isSuccess); }
public void RunAndWait() { this.EventResult = MainAction?.Invoke(this); this.ExcuteDate = DateTime.Now; this.IsExcuted = true; }