Esempio n. 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;
            }
        }
Esempio n. 2
0
 protected AbstractMessage(String type, String name)
 {
     _mType            = type;
     _mName            = name;
     TimestampInMicros = MilliSecondTimer.UnixNowMicroSeconds();
 }