Пример #1
0
        /// <summary>
        /// Get callbacks when the ETW sends us commands`
        /// </summary>
        protected override void OnEventCommand(EventCommandEventArgs command)
        {
#if !MONO
            // To get the AsyncCausality events, we need to inform the AsyncCausalityTracer
            if (command.Command == EventCommand.Enable)
            {
                AsyncCausalityTracer.EnableToETW(true);
            }
            else if (command.Command == EventCommand.Disable)
            {
                AsyncCausalityTracer.EnableToETW(false);
            }
#endif
            if (IsEnabled(EventLevel.Informational, Keywords.TasksFlowActivityIds))
            {
#if !MONO
                ActivityTracker.Instance.Enable();
#endif
            }
            else
            {
                TasksSetActivityIds = IsEnabled(EventLevel.Informational, Keywords.TasksSetActivityIds);
            }

            Debug           = IsEnabled(EventLevel.Informational, Keywords.Debug);
            DebugActivityId = IsEnabled(EventLevel.Informational, Keywords.DebugActivityId);
        }
 // Token: 0x0600415C RID: 16732 RVA: 0x000F2FD8 File Offset: 0x000F11D8
 protected override void OnEventCommand(EventCommandEventArgs command)
 {
     if (command.Command == EventCommand.Enable)
     {
         AsyncCausalityTracer.EnableToETW(true);
     }
     else if (command.Command == EventCommand.Disable)
     {
         AsyncCausalityTracer.EnableToETW(false);
     }
     if (base.IsEnabled(EventLevel.Informational, (EventKeywords)128L))
     {
         ActivityTracker.Instance.Enable();
     }
     else
     {
         this.TasksSetActivityIds = base.IsEnabled(EventLevel.Informational, (EventKeywords)65536L);
     }
     this.Debug           = base.IsEnabled(EventLevel.Informational, (EventKeywords)131072L);
     this.DebugActivityId = base.IsEnabled(EventLevel.Informational, (EventKeywords)262144L);
 }