Beispiel #1
0
        public override void Complete()
        {
            try
            {
                if (IsCompleted())
                {
                    // complete() was called more than once
                    IMessage evt0 = new DefaultEvent("cat", "BadInstrument")
                    {
                        Status = "TransactionAlreadyCompleted"
                    };

                    evt0.Complete();
                    AddChild(evt0);
                }
                else
                {
                    _mDurationInMicro = MilliSecondTimer.UnixNowMicroSeconds() - TimestampInMicros;

                    SetCompleted(true);

                    if (_mManager != null)
                    {
                        _mManager.End(this);
                    }
                }
            }
            catch (Exception ex)
            {
                Cat.lastException = ex;
            }
        }
 public void Bind(string tag, string childMessageId, string title)
 {
     try
     {
         DefaultEvent evt = new DefaultEvent("RemoteCall", "Tagged");
         if (String.IsNullOrEmpty(title))
         {
             title = Type + ":" + Name;
         }
         evt.AddData(childMessageId, title);
         evt.Timestamp = Timestamp;
         evt.Status    = CatConstants.SUCCESS;
         evt.SetCompleted(true);
         AddChild(evt);
     }
     catch (Exception ex)
     {
         Cat.lastException = ex;
     }
 }