コード例 #1
0
 public void UsingEnumArguments(MyLongEnum arg1, MyIntEnum arg2)
 {
     if (IsEnabled())
     {
         WriteEvent(305, arg1, arg2);
     }
 }
コード例 #2
0
 public void UsingEnumArguments(MyLongEnum arg1, MyIntEnum arg2, MyShortEnum arg3)
 {
     if (IsEnabled())
     {
         WriteEvent(306, arg1, arg2, arg3);
     }
 }
コード例 #3
0
 public void UsingAllEnumArguments(MyLongEnum arg1, MyIntEnum arg2, MyShortEnum arg3,
                                   MyByteEnum arg4, MySByteEnum arg5, MyUShortEnum arg6, MyUIntEnum arg7, MyULongEnum arg8)
 {
     if (IsEnabled())
     {
         WriteEvent(307, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
     }
 }
コード例 #4
0
 public void EventWithXferWeirdArgs(Guid RelatedActivityId, IntPtr iptr, bool b, MyLongEnum le /*, decimal dec */)
 {
     unsafe
     {
         EventSource.EventData *descrs = stackalloc EventSource.EventData[4];
         descrs[0].DataPointer = (IntPtr)(&iptr);
         descrs[0].Size        = IntPtr.Size;
         int boolval = b ? 1 : 0;
         descrs[1].DataPointer = (IntPtr)(&boolval);
         descrs[1].Size        = 4;
         descrs[2].DataPointer = (IntPtr)(&le);
         descrs[2].Size        = 8;
         // descrs[3].DataPointer = (IntPtr)(&dec);
         // descrs[3].Size = 16;
         WriteEventWithRelatedActivityIdCore(31, &RelatedActivityId, 3 /*4*/, descrs);
     }
 }
コード例 #5
0
 // 4.5 EventSource does not support IntPtr args
 public void EventWithWeirdArgs(IntPtr iptr, bool b, MyLongEnum le /*, decimal dec*/)
 {
     WriteEvent(30, iptr, b, le /*, dec*/);
 }
コード例 #6
0
 public void UsingEnumArguments(MyLongEnum arg1, MyIntEnum arg2)
 {
     if (IsEnabled()) { WriteEvent(305, arg1, arg2); }
 }
コード例 #7
0
 public void UsingAllEnumArguments(MyLongEnum arg1, MyIntEnum arg2, MyShortEnum arg3,
     MyByteEnum arg4, MySByteEnum arg5, MyUShortEnum arg6, MyUIntEnum arg7, MyULongEnum arg8)
 {
     if (IsEnabled()) { WriteEvent(307, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); }
 }
コード例 #8
0
 public void UsingEnumArguments(MyLongEnum arg1, MyIntEnum arg2, MyShortEnum arg3)
 {
     if (IsEnabled()) { WriteEvent(306, arg1, arg2, arg3); }
 }
コード例 #9
0
ファイル: EventSourceTest.cs プロジェクト: ESgarbi/corefx
 public void EventWithXferWeirdArgs(Guid RelatedActivityId, IntPtr iptr, bool b, MyLongEnum le /*, decimal dec */)
 {
     unsafe
     {
         EventSource.EventData* descrs = stackalloc EventSource.EventData[4];
         descrs[0].DataPointer = (IntPtr)(&iptr);
         descrs[0].Size = IntPtr.Size;
         int boolval = b ? 1 : 0;
         descrs[1].DataPointer = (IntPtr)(&boolval);
         descrs[1].Size = 4;
         descrs[2].DataPointer = (IntPtr)(&le);
         descrs[2].Size = 8;
         // descrs[3].DataPointer = (IntPtr)(&dec);
         // descrs[3].Size = 16;
         WriteEventWithRelatedActivityIdCore(31, &RelatedActivityId, 3 /*4*/, descrs);
     }
 }
コード例 #10
0
ファイル: EventSourceTest.cs プロジェクト: ESgarbi/corefx
 // 4.5 EventSource does not support IntPtr args
 public void EventWithWeirdArgs(IntPtr iptr, bool b, MyLongEnum le /*, decimal dec*/)
 { WriteEvent(30, iptr, b, le /*, dec*/); }
コード例 #11
0
ファイル: BinderTests.cs プロジェクト: chenzuo/nquery
			public MyClassWithEnumMembers(int value)
			{
				_myByteEnum = (MyByteEnum) value;
				_mySByteEnum = (MySByteEnum) value;
				_myShortEnum = (MyShortEnum) value;
				_myUShortEnum = (MyUShortEnum) value;
				_myIntEnum = (MyIntEnum) value;
				_myUIntEnum = (MyUIntEnum) value;
				_myLongEnum = (MyLongEnum) value;
				_myULongEnum = (MyULongEnum) value;
			}