Example #1
0
        /// <summary>
        /// Окружение контекста трассировки
        /// </summary>
        /// <param name="eventName">имя события</param>
        /// <param name="mode"></param>
        public TraceContextScope(string eventName
                                 , TraceContextMode mode = TraceContextMode.Add)
        {
            if (Current != null)
            {
                Id = Current.Id;
            }
            else
            {
                Id = TraceId.Create(eventName);
            }

            Root = TraceEvent.Create(id: Id, name: eventName);
            Mode = mode;

            PushScope();
        }
Example #2
0
 /// <summary>
 /// Null устройство
 /// </summary>
 private NullTrace()
     : base(TraceId.Create("NULL"), null)
 {
 }