public void StartTransaction(string name) { if (Mode.DESIGN == _mode) { this.CheckDesignIsConnected(); var status = _client.GetStatus(); if (status != DesignState.BUSY) { throw(new Exception("Error!! No recording currently running!")); } _client.SetContainer(new SetContainerParams(name)); } else if (Mode.END_USER_EXPERIENCE == _mode || Mode.RUNTIME == _mode) { CheckDataExchangeIsConnected(); if (transactionName != null) { StopTransaction(); } transactionName = name; HandleTimer(); IList <string> timerPath = NewPath(transactionName); timerPath.Add(TRANSACTION_TIMER_NAME); timerBuilder = TimerBuilder.Start(timerPath); } }
public void StartTimer(string name) { HandleTimer(); List <string> path = NewPath(conf); path.Add(TRANSACTION_TIMER_NAME); timerBuilder = TimerBuilder.Start(path); }
private void HandleTimer() { TimerBuilder current = timerBuilder; if (current != null) { dataExchangeAPIClient.AddEntry(current.Stop()); } }
public void StopTransaction() { if (Mode.END_USER_EXPERIENCE == _mode || Mode.RUNTIME == _mode) { CheckDataExchangeIsConnected(); HandleTimer(); transactionName = null; timerBuilder = null; } }
private void HandleTimer() { TimerBuilder current = timerBuilder; if (current != null && this._dataExchangeClient != null) { try { this._dataExchangeClient.AddEntry(current.Stop()); } catch (Exception e) { throw e; } } }
public void StopAndSendTimer() { HandleTimer(); timerBuilder = null; }
public static TimerBuilder.WithBuilder With(this TimerBuilder context, Action Tick) { return(new TimerBuilder.WithBuilder { ContextOfTimerBuilder = context, Tick = Tick }); }