• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Diagnostics.EventDescriptor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Runtime.Diagnostics.EventDescriptor的典型用法代码示例。如果您正苦于以下问题:C# EventDescriptor类的具体用法?C# EventDescriptor怎么用?C# EventDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EventDescriptor类属于System.Runtime.Diagnostics命名空间,在下文中一共展示了EventDescriptor类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: WriteEvent

        internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, EventTraceActivity eventTraceActivity, Guid value1, string value2, string value3)
        {
            const int argumentCount = 3;
            bool status = true;

            //check all strings for null            
            value2 = (value2 ?? string.Empty);
            value3 = (value3 ?? string.Empty);

            fixed (char* string1Bytes = value2, string2Bytes = value3)
            {
                byte* eventData = stackalloc byte[sizeof(UnsafeNativeMethods.EventData) * argumentCount];
                UnsafeNativeMethods.EventData* eventDataPtr = (UnsafeNativeMethods.EventData*)eventData;

                eventDataPtr[0].DataPointer = (ulong)(&value1);
                eventDataPtr[0].Size = (uint)(sizeof(Guid));

                eventDataPtr[1].DataPointer = (ulong)string1Bytes;
                eventDataPtr[1].Size = (uint)(value2.Length + 1) * sizeof(char);
            
                eventDataPtr[2].DataPointer = (ulong)string2Bytes;
                eventDataPtr[2].Size = (uint)(value3.Length + 1) * sizeof(char);                

                status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData));
            }

            return status;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:28,代码来源:EtwProvider.cs


示例2: WriteEvent

		internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, EventTraceActivity eventTraceActivity, Guid value1, string value2, string value3)
		{
			string str = value2;
			string empty = str;
			if (str == null)
			{
				empty = string.Empty;
			}
			value2 = empty;
			string str1 = value3;
			string empty1 = str1;
			if (str1 == null)
			{
				empty1 = string.Empty;
			}
			value3 = empty1;
			fixed (string str2 = value2)
			{
				string* strPointers = &str2;
				char* offsetToStringData = (char*)(&str2);
				if (&str2 != null)
				{
					offsetToStringData = (char*)(strPointers + RuntimeHelpers.OffsetToStringData);
				}
				char* chrPointer = offsetToStringData;
				fixed (string str3 = value3)
				{
					string* strPointers1 = &str3;
					char* offsetToStringData1 = (char*)(&str3);
					if (&str3 != null)
					{
						offsetToStringData1 = (char*)(strPointers1 + RuntimeHelpers.OffsetToStringData);
					}
					byte* length = (byte*)sizeof(UnsafeNativeMethods.EventData) * 3;
					(*((UnsafeNativeMethods.EventData*)length)).DataPointer = (ulong)(&value1);
					(*((UnsafeNativeMethods.EventData*)length)).Size = sizeof(Guid);
					((UnsafeNativeMethods.EventData*)length + sizeof(UnsafeNativeMethods.EventData)).DataPointer = (ulong)chrPointer;
					((UnsafeNativeMethods.EventData*)length + sizeof(UnsafeNativeMethods.EventData)).Size = (value2.Length + 1) * 2;
					((UnsafeNativeMethods.EventData*)length + 2 * sizeof(UnsafeNativeMethods.EventData)).DataPointer = (ulong)offsetToStringData1;
					((UnsafeNativeMethods.EventData*)length + 2 * sizeof(UnsafeNativeMethods.EventData)).Size = (value3.Length + 1) * 2;
					bool flag = base.WriteEvent(ref eventDescriptor, eventTraceActivity, 3, (IntPtr)length);
					return flag;
				}
			}
		}
开发者ID:nickchal,项目名称:pash,代码行数:45,代码来源:EtwProvider.cs


示例3: IsEtwEventEnabled

        public bool IsEtwEventEnabled(ref EventDescriptor eventDescriptor, bool fullCheck)
        {
            // A full check queries ETW via a p/invoke call to see if the event is really enabled.
            // Checking against the level and keywords passed in the ETW callback can provide false positives,
            // but never a false negative.
            // The only code which specifies false is two generated classes, System.Runtime.TraceCore and 
            // System.Activities.EtwTrackingParticipantTrackRecords, and the method EtwDiagnosticTrace.TraceTransfer().
            // FxTrace uses IsEtwEventEnabled without the boolean, which then calls this method specifying true.
            if (fullCheck)
            {
                return (this.EtwTracingEnabled && this.etwProvider.IsEventEnabled(ref eventDescriptor));
            }

            return (this.EtwTracingEnabled && this.etwProvider.IsEnabled(eventDescriptor.Level, eventDescriptor.Keywords));
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:15,代码来源:EtwDiagnosticTrace.cs


示例4: GenerateLegacyTraceCode

        static void GenerateLegacyTraceCode(ref EventDescriptor eventDescriptor, out string msdnTraceCode, out int legacyEventId)
        {
            // To avoid breaking changes between 4.0 and 4.5 we have to use the same values for EventID and TraceCode like in 4.0
            // The mapping between legacy trace code and the new ETW event ids has to be done manually - for example
            // because there was only one event for HandledException in system.diagnostics. For ETW there are multiple events
            // because you have to specify the verbosity level per event in the manifest.

            switch (eventDescriptor.EventId)
            {
                case EventIdsWithMsdnTraceCode.AppDomainUnload:
                    msdnTraceCode = GenerateMsdnTraceCode(DiagnosticTraceSource, TraceCodes.AppDomainUnload);
                    legacyEventId = LegacyTraceEventIds.AppDomainUnload;
                    break;
                case EventIdsWithMsdnTraceCode.HandledExceptionError:
                case EventIdsWithMsdnTraceCode.HandledExceptionWarning:
                case EventIdsWithMsdnTraceCode.HandledExceptionInfo:
                case EventIdsWithMsdnTraceCode.HandledExceptionVerbose:
                    msdnTraceCode = GenerateMsdnTraceCode(DiagnosticTraceSource, TraceCodes.TraceHandledException);
                    legacyEventId = LegacyTraceEventIds.TraceHandledException;
                    break;    
                case EventIdsWithMsdnTraceCode.ThrowingExceptionVerbose:
                case EventIdsWithMsdnTraceCode.ThrowingExceptionWarning:
                    msdnTraceCode = GenerateMsdnTraceCode(DiagnosticTraceSource, TraceCodes.ThrowingException);
                    legacyEventId = LegacyTraceEventIds.ThrowingException;
                    break; 
                case EventIdsWithMsdnTraceCode.UnhandledException:
                    msdnTraceCode = GenerateMsdnTraceCode(DiagnosticTraceSource, TraceCodes.UnhandledException);
                    legacyEventId = LegacyTraceEventIds.UnhandledException;
                    break; 
                default:
                    msdnTraceCode = eventDescriptor.EventId.ToString(CultureInfo.InvariantCulture);
                    legacyEventId = eventDescriptor.EventId;
                    break;
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:35,代码来源:EtwDiagnosticTrace.cs


示例5: WriteTraceSource

        public void WriteTraceSource(ref EventDescriptor eventDescriptor, string description, TracePayload payload)
        {
            if (this.TracingEnabled)
            {
                XPathNavigator navigator = null;
                try
                {
                    string msdnTraceCode;
                    int legacyEventId;
                    EtwDiagnosticTrace.GenerateLegacyTraceCode(ref eventDescriptor, out msdnTraceCode, out legacyEventId);

                    string traceString = BuildTrace(ref eventDescriptor, description, payload, msdnTraceCode);
                    XmlDocument traceDocument = new XmlDocument();
                    traceDocument.LoadXml(traceString);
                    navigator = traceDocument.CreateNavigator();
                    this.TraceSource.TraceData(TraceLevelHelper.GetTraceEventType(eventDescriptor.Level, eventDescriptor.Opcode), legacyEventId, navigator);

                    if (this.CalledShutdown)
                    {
                        this.TraceSource.Flush();
                    }
                }
                catch (Exception exception)
                {
                    if (Fx.IsFatal(exception))
                    {
                        throw;
                    }

                    LogTraceFailure(navigator == null ? string.Empty : navigator.ToString(), exception);
                }
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:33,代码来源:EtwDiagnosticTrace.cs


示例6: WriteTransferEvent

        protected bool WriteTransferEvent(ref EventDescriptor eventDescriptor, EventTraceActivity eventTraceActivity, Guid relatedActivityId, int dataCount, IntPtr data)
        {
            // ActivityId is required when writing transfer event
            if (eventTraceActivity == null)
            {
                throw Fx.Exception.ArgumentNull("eventTraceActivity");
            }

            uint status = 0;
            unsafe
            {
                status = UnsafeNativeMethods.EventWriteTransfer(this.traceRegistrationHandle,
                                                ref eventDescriptor,
                                                ref eventTraceActivity.ActivityId,
                                                ref relatedActivityId,
                                                (uint)dataCount,
                                                (UnsafeNativeMethods.EventData*)data);
            }

            if (status != 0)
            {
                SetLastError((int)status);
                return false;
            }
            return true;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:26,代码来源:DiagnosticEventProvider.cs


示例7: WriteEvent

        internal protected bool WriteEvent(ref EventDescriptor eventDescriptor, EventTraceActivity eventTraceActivity, int dataCount, IntPtr data)
        {
            uint status = 0;

            if (eventTraceActivity != null)
            {
                SetActivityId(ref eventTraceActivity.ActivityId);
            }

            unsafe
            {
                status = UnsafeNativeMethods.EventWrite(this.traceRegistrationHandle, ref eventDescriptor, (uint)dataCount, (UnsafeNativeMethods.EventData*)data);
            }
            if (status != 0)
            {
                SetLastError((int)status);
                return false;
            }
            return true;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:20,代码来源:DiagnosticEventProvider.cs


示例8: IsEtwEventEnabled

 public bool IsEtwEventEnabled(ref EventDescriptor eventDescriptor, bool fullCheck)
 {
     return false;
 }
开发者ID:weshaggard,项目名称:wcf,代码行数:4,代码来源:EtwDiagnosticTrace.cs


示例9: WriteTraceSource

 public void WriteTraceSource(ref EventDescriptor eventDescriptor, string description, TracePayload payload)
 {
 }
开发者ID:weshaggard,项目名称:wcf,代码行数:3,代码来源:EtwDiagnosticTrace.cs


示例10: CreateEventDescriptors

 static void CreateEventDescriptors()
 {
     System.Runtime.Diagnostics.EventDescriptor[] descriptors = new System.Runtime.Diagnostics.EventDescriptor[] {
             new System.Runtime.Diagnostics.EventDescriptor(5406, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0xa35, 0x1000000000000010),
             new System.Runtime.Diagnostics.EventDescriptor(5405, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0xa35, 0x1000000000000010),
             new System.Runtime.Diagnostics.EventDescriptor(5404, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0xa34, 0x1000000000000010),
             new System.Runtime.Diagnostics.EventDescriptor(5402, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0xa34, 0x1000000000000010),
             new System.Runtime.Diagnostics.EventDescriptor(5403, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0xa34, 0x1000000000000010)};
     // The hashcodes calculated from PTCop for TD.CreateEventDescriptors are unstable when just declaring
     // a local field of ushort[] if the array is non-empty and contains more than 2 entries, because
     // the c#-compiler is using some private types for optimization. The type name follows the following pattern:
     // <PrivateImplementationDetails>{6BAE93FD-290B-4DE0-BCEE-366B30800FDF} (where the GUID is changing with every build)
     // To scope the change to unblock PTCop as much as possible we wrap the list of End2EndEvents in a List<ushort>
     System.Collections.Generic.List<ushort> e2eEvents = new System.Collections.Generic.List<ushort>(5);
     e2eEvents.Add(5402);
     e2eEvents.Add(5403);
     e2eEvents.Add(5404);
     e2eEvents.Add(5405);
     e2eEvents.Add(5406);
     FxTrace.UpdateEventDefinitions(descriptors, e2eEvents.ToArray());
     eventDescriptors = descriptors;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:22,代码来源:TD.Designer.cs


示例11: WriteTransferEvent

		internal unsafe bool WriteTransferEvent(ref EventDescriptor eventDescriptor, EventTraceActivity eventTraceActivity, Guid relatedActivityId, string value1, string value2)
		{
			string str = value1;
			string empty = str;
			if (str == null)
			{
				empty = string.Empty;
			}
			value1 = empty;
			string str1 = value2;
			string empty1 = str1;
			if (str1 == null)
			{
				empty1 = string.Empty;
			}
			value2 = empty1;
			fixed (string str2 = value1)
			{
				string* strPointers = &str2;
				char* offsetToStringData = (char*)(&str2);
				if (&str2 != null)
				{
					offsetToStringData = (char*)(strPointers + RuntimeHelpers.OffsetToStringData);
				}
				char* chrPointer = offsetToStringData;
				fixed (string str3 = value2)
				{
					string* strPointers1 = &str3;
					char* offsetToStringData1 = (char*)(&str3);
					if (&str3 != null)
					{
						offsetToStringData1 = (char*)(strPointers1 + RuntimeHelpers.OffsetToStringData);
					}
					/*
					byte* length = (byte*)sizeof(UnsafeNativeMethods.EventData) * 2;
					(*((UnsafeNativeMethods.EventData*)length)).DataPointer = (ulong)chrPointer;
					(*((UnsafeNativeMethods.EventData*)length)).Size = (value1.Length + 1) * 2;
					((UnsafeNativeMethods.EventData*)length + sizeof(UnsafeNativeMethods.EventData)).DataPointer = (ulong)offsetToStringData1;
					((UnsafeNativeMethods.EventData*)length + sizeof(UnsafeNativeMethods.EventData)).Size = (value2.Length + 1) * 2;
					*/
					bool flag = base.WriteTransferEvent(ref eventDescriptor, eventTraceActivity, relatedActivityId, 2, IntPtr.Zero); //TODO: REVIEW: (IntPtr)length);
					return flag;
				}
			}
		}
开发者ID:nickchal,项目名称:pash,代码行数:45,代码来源:EtwProvider.cs


示例12: CreateEventDescriptors

 static void CreateEventDescriptors()
 {
     System.Runtime.Diagnostics.EventDescriptor[] descriptors = new System.Runtime.Diagnostics.EventDescriptor[] {
             new System.Runtime.Diagnostics.EventDescriptor(39456, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)125, 0xa26, 0x1000000000000040),
             new System.Runtime.Diagnostics.EventDescriptor(39457, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)126, 0xa26, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(39458, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)127, 0xa26, 0x1000000000000040),
             new System.Runtime.Diagnostics.EventDescriptor(39459, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0xa25, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1223, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0x9e7, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(2576, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)131, 0xa29, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(2577, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)129, 0xa29, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(2578, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)130, 0xa29, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(1023, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)21, 0x9d6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1019, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)22, 0x9d6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1016, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)23, 0x9d6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1013, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)24, 0x9d6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1031, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)25, 0x9d6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1034, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)26, 0x9d6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1028, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)27, 0x9d6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1020, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x9dc, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1024, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x9dc, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1038, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x9ff, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1039, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x9ff, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1040, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x9e7, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(1037, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)104, 0xa08, 0x1000000004000000),
             new System.Runtime.Diagnostics.EventDescriptor(1036, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)105, 0xa08, 0x1000000004000000),
             new System.Runtime.Diagnostics.EventDescriptor(1035, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)106, 0xa08, 0x1000000004000000),
             new System.Runtime.Diagnostics.EventDescriptor(1021, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)107, 0xa0a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1017, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)108, 0xa0a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1014, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)109, 0xa0a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1011, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)110, 0xa0a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1029, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)111, 0xa0a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1032, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)112, 0xa0a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1026, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)113, 0xa0a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1022, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)117, 0xa1e, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1018, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)118, 0xa1e, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1015, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)119, 0xa1e, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1012, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)120, 0xa1e, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1030, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)121, 0xa1e, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1033, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)122, 0xa1e, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1027, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)123, 0xa1e, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1025, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Info, 0x9f5, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1104, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Resume, 0xa2f, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1101, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Start, 0xa2f, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1102, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Stop, 0xa2f, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1103, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Suspend, 0xa2f, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1010, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0x9d5, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1009, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa09, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1004, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)136, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1003, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)137, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1001, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)134, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1005, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)135, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1041, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)138, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1007, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)139, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1002, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)140, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1006, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)141, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1008, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)142, 0xa2d, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1124, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)73, 0x9f7, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1125, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)72, 0x9f7, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1126, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)74, 0x9f7, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1131, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)75, 0x9f7, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1132, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)71, 0x9f7, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(1140, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)11, 0x9e8, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(1141, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)60, 0x9e8, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(1143, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)61, 0x9e8, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(1146, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)62, 0x9e8, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(1147, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)64, 0x9e8, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(1148, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)63, 0x9e8, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(1150, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0x9d4, 0x1000000002000000),
             new System.Runtime.Diagnostics.EventDescriptor(39460, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)TraceEventOpcode.Info, 0xa25, 0x1000000000000040),
             new System.Runtime.Diagnostics.EventDescriptor(2021, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Start, 0x9e9, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(2022, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Stop, 0x9e9, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(2024, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Start, 0x9f6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(2025, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Stop, 0x9f6, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(2026, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Start, 0xa2a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(2029, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Stop, 0xa2a, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(2027, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Start, 0x9ce, 0x1000000001000000),
             new System.Runtime.Diagnostics.EventDescriptor(2028, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Stop, 0x9ce, 0x1000000001000000)};
     ushort[] e2eEvents = new ushort[0];
     FxTrace.UpdateEventDefinitions(descriptors, e2eEvents);
     eventDescriptors = descriptors;
 }
开发者ID:REALTOBIZ,项目名称:mono,代码行数:81,代码来源:TD.Designer.cs


示例13: CreateEventDescriptors

 /// <summary>
 /// Creates the event descriptors array
 /// </summary>
 static void CreateEventDescriptors()
 {
     System.Runtime.Diagnostics.EventDescriptor[] descriptors = new System.Runtime.Diagnostics.EventDescriptor[] {
             new System.Runtime.Diagnostics.EventDescriptor(62326, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0x9de, 0x1000000000000080)};
     ushort[] e2eEvents = new ushort[0];
     FxTrace.UpdateEventDefinitions(descriptors, e2eEvents);
     eventDescriptors = descriptors;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:TD.Designer.cs


示例14: Event

 public void Event(ref EventDescriptor eventDescriptor, string description)
 {
     if (this.TracingEnabled)
     {
         TracePayload tracePayload = this.GetSerializedPayload(null, null, null);
         this.WriteTraceSource(ref eventDescriptor, description, tracePayload);
     }
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:8,代码来源:EtwDiagnosticTrace.cs


示例15: Equals

 public bool Equals(EventDescriptor other)
 {
     if ((m_id != other.m_id) ||
         (m_version != other.m_version) ||
         (m_channel != other.m_channel) ||
         (m_level != other.m_level) ||
         (m_opcode != other.m_opcode) ||
         (m_task != other.m_task) ||
         (m_keywords != other.m_keywords))
     {
         return false;
     }
     return true;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:14,代码来源:EventDescriptor.cs


示例16: BuildTrace

        static string BuildTrace(ref EventDescriptor eventDescriptor, string description, TracePayload payload, string msdnTraceCode)
        {
            StringBuilder sb = StringBuilderPool.Take();
            try
            {
                using (StringWriter stringWriter = new StringWriter(sb, CultureInfo.CurrentCulture))
                {
                    using (XmlTextWriter writer = new XmlTextWriter(stringWriter))
                    {
                        writer.WriteStartElement(DiagnosticStrings.TraceRecordTag);
                        writer.WriteAttributeString(DiagnosticStrings.NamespaceTag, EtwDiagnosticTrace.TraceRecordVersion);
                        writer.WriteAttributeString(DiagnosticStrings.SeverityTag,
                            TraceLevelHelper.LookupSeverity((TraceEventLevel)eventDescriptor.Level, (TraceEventOpcode)eventDescriptor.Opcode));
                        writer.WriteAttributeString(DiagnosticStrings.ChannelTag, EtwDiagnosticTrace.LookupChannel((TraceChannel)eventDescriptor.Channel));

                        writer.WriteElementString(DiagnosticStrings.TraceCodeTag, msdnTraceCode);
                        writer.WriteElementString(DiagnosticStrings.DescriptionTag, description);
                        writer.WriteElementString(DiagnosticStrings.AppDomain, payload.AppDomainFriendlyName);

                        if (!string.IsNullOrEmpty(payload.EventSource))
                        {
                            writer.WriteElementString(DiagnosticStrings.SourceTag, payload.EventSource);
                        }

                        if (!string.IsNullOrEmpty(payload.ExtendedData))
                        {
                            writer.WriteRaw(payload.ExtendedData);
                        }

                        if (!string.IsNullOrEmpty(payload.SerializedException))
                        {
                            writer.WriteRaw(payload.SerializedException);
                        }

                        writer.WriteEndElement();
                        writer.Flush();
                        stringWriter.Flush();

                        return sb.ToString();
                    }
                }
            }
            finally
            {
                StringBuilderPool.Return(sb);
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:47,代码来源:EtwDiagnosticTrace.cs


示例17: UpdateEventDefinitions

 public static void UpdateEventDefinitions(EventDescriptor[] descriptors, ushort[] e2EEvents)
 {
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:3,代码来源:Additional.cs



注:本文中的System.Runtime.Diagnostics.EventDescriptor类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Diagnostics.EventTraceActivity类代码示例发布时间:2022-05-26
下一篇:
C# Diagnostics.EtwDiagnosticTrace类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap