Exemplo n.º 1
0
 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());
            }
        }
Exemplo n.º 4
0
 public void StopTransaction()
 {
     if (Mode.END_USER_EXPERIENCE == _mode || Mode.RUNTIME == _mode)
     {
         CheckDataExchangeIsConnected();
         HandleTimer();
         transactionName = null;
         timerBuilder    = null;
     }
 }
Exemplo n.º 5
0
        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;
 }
Exemplo n.º 7
0
 public static TimerBuilder.WithBuilder With(this TimerBuilder context, Action Tick)
 {
     return(new TimerBuilder.WithBuilder {
         ContextOfTimerBuilder = context, Tick = Tick
     });
 }