Ejemplo n.º 1
0
        public ITaggedTransaction NewTaggedTransaction(string type, string name, string tag)
        {
            // this enable CAT client logging cat message without explicit setup
            if (!_mManager.HasContext())
            {
                _mManager.Setup();
            }

            if (_mManager.CatEnabled)
            {
                IMessageTree tree = _mManager.ThreadLocalMessageTree;

                if (tree.MessageId == null)
                {
                    tree.MessageId = CreateMessageId();
                }

                ITaggedTransaction transaction = new DefaultTaggedTransaction(type, name, tag, _mManager);

                _mManager.Start(transaction, true);
                return(transaction);
            }
            else
            {
                return(NullMessage.TAGGEDTRANSACTION);
            }
        }
 public void MarkAsRunAway(ITransaction parent, DefaultTaggedTransaction transaction)
 {
     if (!transaction.HasChildren())
     {
         transaction.AddData("RunAway");
     }
     transaction.Status     = CatConstants.SUCCESS;
     transaction.Standalone = true;
     transaction.Complete();
 }
Ejemplo n.º 3
0
        public virtual ITaggedTransaction NewTaggedTransaction(string type, string name, string tag)
        {
            if (!_mManager.HasContext())
            {
                _mManager.Setup();
            }

            if (_mManager.CatEnabled)
            {
                DefaultTaggedTransaction transaction = new DefaultTaggedTransaction(type, name, tag, _mManager);
                _mManager.Start(transaction, true);
                return(transaction);
            }
            else
            {
                return(new NullTransaction());
            }
        }