/
EventProvider.xml
870 lines (784 loc) · 50 KB
/
EventProvider.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
<Type Name="EventProvider" FullName="System.Diagnostics.Eventing.EventProvider">
<TypeSignature Language="C#" Value="public class EventProvider : IDisposable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit EventProvider extends System.Object implements class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:System.Diagnostics.Eventing.EventProvider" />
<TypeSignature Language="VB.NET" Value="Public Class EventProvider
Implements IDisposable" />
<TypeSignature Language="F#" Value="type EventProvider = class
 interface IDisposable" />
<TypeSignature Language="C++ CLI" Value="public ref class EventProvider : IDisposable" />
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Use this class to write events.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To consume events written using the <xref:System.Diagnostics.Eventing.EventProvider.WriteEvent%2A> and <xref:System.Diagnostics.Eventing.EventProvider.WriteTransferEvent%2A> methods, the events must be defined in a manifest; events written using the <xref:System.Diagnostics.Eventing.EventProvider.WriteMessageEvent%2A> method do not require a manifest.
Events can contain the following managed data types:
- bool
- Boolean
- byte
- char
- decimal
- double
- float
- Guid
- int
- IntPtr
- long
- sbyte
- short
- string
- uint
- UInt64
If an event in your manifest uses the `Boolean` in-type, you cannot write the data element using a `Boolean` data type in your managed code. The `Boolean` in-type in your manifest expects a 4-byte value, and a `Boolean` data type in managed code is 1-byte. Instead, you must use an `int` data type to write the value. If you want to log a `Boolean` value, use the UInt8 in-type in your manifest.
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EventProvider (Guid providerGuid);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Guid providerGuid) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.#ctor(System.Guid)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (providerGuid As Guid)" />
<MemberSignature Language="F#" Value="new System.Diagnostics.Eventing.EventProvider : Guid -> System.Diagnostics.Eventing.EventProvider" Usage="new System.Diagnostics.Eventing.EventProvider providerGuid" />
<MemberSignature Language="C++ CLI" Value="public:
 EventProvider(Guid providerGuid);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.5;netframework-4.0">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecuritySafeCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecuritySafeCritical>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="providerGuid" Type="System.Guid" />
</Parameters>
<Docs>
<param name="providerGuid">Guid that uniquely identifies the provider.</param>
<summary>Initializes a new instance of the <see cref="T:System.Diagnostics.Eventing.EventProvider" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Registers the provider. To remove the registration when finished, call the <xref:System.Diagnostics.Eventing.EventProvider.Close%2A> method.
]]></format>
</remarks>
<exception cref="T:System.InsufficientMemoryException">There is not enough memory to complete the operation.</exception>
<exception cref="T:System.PlatformNotSupportedException">The classes in the <see cref="N:System.Diagnostics.Eventing" /> namespace work only on Windows Vista.</exception>
<exception cref="T:System.ArgumentException">The <paramref name="providerGuid" /> parameter cannot be null.</exception>
<exception cref="T:System.ComponentModel.Win32Exception">An error returned by the ETW subsystem.</exception>
</Docs>
</Member>
<Member MemberName="Close">
<MemberSignature Language="C#" Value="public virtual void Close ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Close() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.Close" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Close ()" />
<MemberSignature Language="F#" Value="abstract member Close : unit -> unit
override this.Close : unit -> unit" Usage="eventProvider.Close " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void Close();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes the provider's registration from the ETW subsystem and releases all unmanaged resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You should call this method when finished instead of waiting for the system to dispose of the resources.
]]></format>
</remarks>
<exception cref="T:System.ComponentModel.Win32Exception">An error returned by the ETW subsystem.</exception>
</Docs>
</Member>
<Member MemberName="CreateActivityId">
<MemberSignature Language="C#" Value="public static Guid CreateActivityId ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Guid CreateActivityId() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.CreateActivityId" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateActivityId () As Guid" />
<MemberSignature Language="F#" Value="static member CreateActivityId : unit -> Guid" Usage="System.Diagnostics.Eventing.EventProvider.CreateActivityId " />
<MemberSignature Language="C++ CLI" Value="public:
 static Guid CreateActivityId();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Guid</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a unique activity identifier for the provider.</summary>
<returns>A unique Guid that you use when calling the <see cref="M:System.Diagnostics.Eventing.EventProvider.SetActivityId(System.Guid@)" /> method to set the activity identifier for the provider.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This is a static method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit" Usage="eventProvider.Dispose " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void Dispose();" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases the resources used by this <see cref="T:System.Diagnostics.Eventing.EventProvider" /> object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit" Usage="eventProvider.Dispose disposing" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual void Dispose(bool disposing);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.5">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-3.5">
<AttributeName Language="C#">[System.Security.SecurityTreatAsSafe]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityTreatAsSafe>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecuritySafeCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecuritySafeCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="disposing">This parameter is ignored by this method since there are no unmanaged resources.</param>
<summary>Releases the resources used by this <see cref="T:System.Diagnostics.Eventing.EventProvider" /> object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Finalize">
<MemberSignature Language="C#" Value="~EventProvider ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Finalize() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.Finalize" />
<MemberSignature Language="VB.NET" Value="Finalize ()" />
<MemberSignature Language="F#" Value="override this.Finalize : unit -> unit" Usage="eventProvider.Finalize " />
<MemberSignature Language="C++ CLI" Value="!EventProvider ()" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Frees resources and performs internal cleanup before the instance is reclaimed by garbage collection.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetLastWriteEventError">
<MemberSignature Language="C#" Value="public static System.Diagnostics.Eventing.EventProvider.WriteEventErrorCode GetLastWriteEventError ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Diagnostics.Eventing.EventProvider/WriteEventErrorCode GetLastWriteEventError() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetLastWriteEventError () As EventProvider.WriteEventErrorCode" />
<MemberSignature Language="F#" Value="static member GetLastWriteEventError : unit -> System.Diagnostics.Eventing.EventProvider.WriteEventErrorCode" Usage="System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError " />
<MemberSignature Language="C++ CLI" Value="public:
 static System::Diagnostics::Eventing::EventProvider::WriteEventErrorCode GetLastWriteEventError();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Diagnostics.Eventing.EventProvider+WriteEventErrorCode</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the last error associated with an event write failure.</summary>
<returns>Use the value to determine the cause of an event write failure.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Diagnostics.Eventing.EventProvider.WriteEvent%2A>, <xref:System.Diagnostics.Eventing.EventProvider.WriteMessageEvent%2A>, and <xref:System.Diagnostics.Eventing.EventProvider.WriteTransferEvent%2A> methods set this value if they fail to write the event.
This is a static method.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="IsEnabled">
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Determines whether a session enabled the provider.</summary>
</Docs>
</MemberGroup>
<Member MemberName="IsEnabled">
<MemberSignature Language="C#" Value="public bool IsEnabled ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool IsEnabled() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.IsEnabled" />
<MemberSignature Language="VB.NET" Value="Public Function IsEnabled () As Boolean" />
<MemberSignature Language="F#" Value="member this.IsEnabled : unit -> bool" Usage="eventProvider.IsEnabled " />
<MemberSignature Language="C++ CLI" Value="public:
 bool IsEnabled();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Determines whether any session enabled the provider, regardless of the level and keyword values used to enable the provider.</summary>
<returns>Is <see langword="true" /> if the provider is enabled to any session; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Typically, a provider does not call this method to determine whether the provider has been enabled by a session; the provider simply writes the event, and ETW determines whether the event is logged to the session. A provider may want to call this function if the provider needs to perform extra work to generate the event. In this case, calling this function first may save resources and time.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsEnabled">
<MemberSignature Language="C#" Value="public bool IsEnabled (byte level, long keywords);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool IsEnabled(unsigned int8 level, int64 keywords) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.IsEnabled(System.Byte,System.Int64)" />
<MemberSignature Language="VB.NET" Value="Public Function IsEnabled (level As Byte, keywords As Long) As Boolean" />
<MemberSignature Language="F#" Value="member this.IsEnabled : byte * int64 -> bool" Usage="eventProvider.IsEnabled (level, keywords)" />
<MemberSignature Language="C++ CLI" Value="public:
 bool IsEnabled(System::Byte level, long keywords);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="level" Type="System.Byte" />
<Parameter Name="keywords" Type="System.Int64" />
</Parameters>
<Docs>
<param name="level">Level of detail included in the event.</param>
<param name="keywords">Bit mask that specifies the event category. This mask should be the same keyword mask that is defined in the manifest for the event.</param>
<summary>Determines whether any session is requesting the specified event from the provider.</summary>
<returns>Is <see langword="true" /> if any session is requesting the specified event; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Typically, a provider does not call this method to determine whether a session requested the specified event; the provider simply writes the event, and ETW determines whether the event is logged to a session. A provider may want to call this function if the provider needs to perform extra work to generate the event. In this case, calling this function first to determine if a session requested the event or not, may save resources and time.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SetActivityId">
<MemberSignature Language="C#" Value="public static void SetActivityId (ref Guid id);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetActivityId(valuetype System.Guid& id) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.SetActivityId(System.Guid@)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub SetActivityId (ByRef id As Guid)" />
<MemberSignature Language="F#" Value="static member SetActivityId : Guid -> unit" Usage="System.Diagnostics.Eventing.EventProvider.SetActivityId id" />
<MemberSignature Language="C++ CLI" Value="public:
 static void SetActivityId(Guid % id);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.Guid" RefType="ref" />
</Parameters>
<Docs>
<param name="id">A unique activity identifier that the <see cref="M:System.Diagnostics.Eventing.EventProvider.CreateActivityId" /> method returns.</param>
<summary>Sets the current activity identifier used by the <see cref="Overload:System.Diagnostics.Eventing.EventProvider.WriteEvent" /> methods.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The identifier is stored in the thread context.
Note that in version 3.5 of the .NET framework, you had to set the `id` parameter of this method and the <xref:System.Diagnostics.CorrelationManager.ActivityId%2A> property value to the same identifier value. However, in version 4.0 of the framework, the <xref:System.Diagnostics.Eventing.EventProvider.SetActivityId%2A> method automatically sets the correlation activity identifier for you.
This is a static method.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="WriteEvent">
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Writes an event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use these methods if you use a manifest to define your events.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="WriteEvent">
<MemberSignature Language="C#" Value="public bool WriteEvent (ref System.Diagnostics.Eventing.EventDescriptor eventDescriptor, params object[] eventPayload);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool WriteEvent(valuetype System.Diagnostics.Eventing.EventDescriptor& eventDescriptor, object[] eventPayload) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.WriteEvent(System.Diagnostics.Eventing.EventDescriptor@,System.Object[])" />
<MemberSignature Language="VB.NET" Value="Public Function WriteEvent (ByRef eventDescriptor As EventDescriptor, ParamArray eventPayload As Object()) As Boolean" />
<MemberSignature Language="F#" Value="member this.WriteEvent : EventDescriptor * obj[] -> bool" Usage="eventProvider.WriteEvent (eventDescriptor, eventPayload)" />
<MemberSignature Language="C++ CLI" Value="public:
 bool WriteEvent(System::Diagnostics::Eventing::EventDescriptor % eventDescriptor, ... cli::array <System::Object ^> ^ eventPayload);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.5">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventDescriptor" Type="System.Diagnostics.Eventing.EventDescriptor" RefType="ref" />
<Parameter Name="eventPayload" Type="System.Object[]">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ParamArray]</AttributeName>
<AttributeName Language="F#">[<System.ParamArray>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="eventDescriptor">An instance of <see cref="T:System.Diagnostics.Eventing.EventDescriptor" /> that identifies the event to write.</param>
<param name="eventPayload">An array of objects that contain the event data to write. The object must be in the order specified in the manifest. The array is limited to 32 objects, of which only eight may be strings. The maximum data size for the event is limited to 64 KB minus the size of the event headers. The event size is less if the session's buffer size is less and the session includes extended data items with the event.
This parameter can be null.</param>
<summary>Writes an event. The event data is specified as an array of objects.</summary>
<returns>Is <see langword="true" /> if the event is written; otherwise, <see langword="false" />. If false, call the <see cref="M:System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError" /> method to determine the cause of the failure.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you call the <xref:System.Diagnostics.Eventing.EventProvider.SetActivityId%2A> method to specify an activity identifier for the event, this method retrieves the identifier from the thread context and includes it with the event.
If the object type is not supported, the method writes the value of the object's <xref:System.Object.ToString%2A?displayProperty=nameWithType> method in the payload. For a list of supported object types, see the Remarks for the <xref:System.Diagnostics.Eventing.EventProvider> class.
## Examples
```csharp
private static Guid providerId = new Guid("{FB33FDA8-45FB-4df0-8A55-EEB4BA88E7E7}");
enum Keyword
{
Read = 0x1,
Write = 0x2,
Local = 0x4,
Remote = 0x8
}
enum Level
{
Critical = 1,
Error,
Warning,
Information,
Verbose
}
EventProvider provider = new EventProvider(providerId);
EventDescriptor readEvent;
string path = @"<PATHGOESHERE>";
UInt64 bytesRead = <ASSIGNVALUE>;
if (provider.IsEnabled(Level.Information, (long)Keyword.Read))
{
unchecked
{
readEvent = new EventDescriptor(0x1, 0x0, 0x10, 0x4, 0x0, 0x0, (long)0x8000000000000005);
}
if (!provider.WriteEvent(ref readEvent, new object[] { path, bytesRead }))
Console.WriteLine(EventProvider.GetLastWriteEventError());
}
provider.Close();
```
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The <paramref name="eventPayload" /> parameter contains too many objects or strings.</exception>
</Docs>
</Member>
<Member MemberName="WriteEvent">
<MemberSignature Language="C#" Value="public bool WriteEvent (ref System.Diagnostics.Eventing.EventDescriptor eventDescriptor, string data);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool WriteEvent(valuetype System.Diagnostics.Eventing.EventDescriptor& eventDescriptor, string data) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.WriteEvent(System.Diagnostics.Eventing.EventDescriptor@,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function WriteEvent (ByRef eventDescriptor As EventDescriptor, data As String) As Boolean" />
<MemberSignature Language="F#" Value="member this.WriteEvent : EventDescriptor * string -> bool" Usage="eventProvider.WriteEvent (eventDescriptor, data)" />
<MemberSignature Language="C++ CLI" Value="public:
 bool WriteEvent(System::Diagnostics::Eventing::EventDescriptor % eventDescriptor, System::String ^ data);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventDescriptor" Type="System.Diagnostics.Eventing.EventDescriptor" RefType="ref" />
<Parameter Name="data" Type="System.String" />
</Parameters>
<Docs>
<param name="eventDescriptor">An instance of <see cref="T:System.Diagnostics.Eventing.EventDescriptor" /> that identifies the event to write.</param>
<param name="data">The string to write as the event data.</param>
<summary>Writes an event. The event data is specified as a string.</summary>
<returns>Is <see langword="true" /> if the event is written; otherwise, <see langword="false" />. If false, call the <see cref="M:System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError" /> method to determine the cause of the failure.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you call the <xref:System.Diagnostics.Eventing.EventProvider.SetActivityId%2A> method to specify an activity identifier for the event, this method retrieves the identifier from the thread context and includes it with the event.
The maximum string length is limited to 64 KB minus the size of the event headers. The event size is less if the session's buffer size is less and the session includes extended data items with the event.
## Examples
```csharp
private static Guid providerId = new Guid("{FB33FDA8-45FB-4df0-8A55-EEB4BA88E7E7}");
EventProvider provider = new EventProvider(providerId);
EventDescriptor writeEvent;
if (provider.IsEnabled())
{
unchecked
{
writeEvent = new EventDescriptor(0x2, 0x0, 0x10, 0x3, 0x0, 0x0, (long)0x8000000000000006);
}
if (!provider.WriteEvent(ref writeEvent, "Write event."))
Console.WriteLine(EventProvider.GetLastWriteEventError());
}
provider.Close();
```
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">If <paramref name="data" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="WriteEvent">
<MemberSignature Language="C#" Value="protected bool WriteEvent (ref System.Diagnostics.Eventing.EventDescriptor eventDescriptor, int dataCount, IntPtr data);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance bool WriteEvent(valuetype System.Diagnostics.Eventing.EventDescriptor& eventDescriptor, int32 dataCount, native int data) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.WriteEvent(System.Diagnostics.Eventing.EventDescriptor@,System.Int32,System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Protected Function WriteEvent (ByRef eventDescriptor As EventDescriptor, dataCount As Integer, data As IntPtr) As Boolean" />
<MemberSignature Language="F#" Value="member this.WriteEvent : EventDescriptor * int * nativeint -> bool" Usage="eventProvider.WriteEvent (eventDescriptor, dataCount, data)" />
<MemberSignature Language="C++ CLI" Value="protected:
 bool WriteEvent(System::Diagnostics::Eventing::EventDescriptor % eventDescriptor, int dataCount, IntPtr data);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventDescriptor" Type="System.Diagnostics.Eventing.EventDescriptor" RefType="ref" />
<Parameter Name="dataCount" Type="System.Int32" />
<Parameter Name="data" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="eventDescriptor">An instance of <see cref="T:System.Diagnostics.Eventing.EventDescriptor" /> that identifies the event to write.</param>
<param name="dataCount">Size of the event data to which the <paramref name="data" /> parameter points. The maximum event data size is limited to 64 KB minus the size of the event headers. The event size is less if the session's buffer size is less and the session includes extended data items with the event.</param>
<param name="data">Pointer to the event data to write.</param>
<summary>Writes an event. The event data is specified as a block of memory.</summary>
<returns>Is <see langword="true" /> if the event is written; otherwise, <see langword="false" />. If false, call the <see cref="M:System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError" /> method to determine the cause of the failure.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you call the <xref:System.Diagnostics.Eventing.EventProvider.SetActivityId%2A> method to specify an activity identifier for the event, this method retrieves the identifier from the thread context and includes it with the event.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="WriteMessageEvent">
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Writes an event that contains a string as its data.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
These methods do not require a manifest to consume the event.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="WriteMessageEvent">
<MemberSignature Language="C#" Value="public bool WriteMessageEvent (string eventMessage);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool WriteMessageEvent(string eventMessage) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.WriteMessageEvent(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function WriteMessageEvent (eventMessage As String) As Boolean" />
<MemberSignature Language="F#" Value="member this.WriteMessageEvent : string -> bool" Usage="eventProvider.WriteMessageEvent eventMessage" />
<MemberSignature Language="C++ CLI" Value="public:
 bool WriteMessageEvent(System::String ^ eventMessage);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventMessage" Type="System.String" />
</Parameters>
<Docs>
<param name="eventMessage">String to write as the event data.</param>
<summary>Writes an event that contains a string as its data.</summary>
<returns>Is <see langword="true" /> if the event is written; otherwise, <see langword="false" />. If false, call the <see cref="M:System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError" /> method to determine the cause of the failure.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The maximum string length is limited to 64 KB minus the size of the event headers. The event size is less if the session's buffer size is less and the session includes extended data items with the event.
## Examples
```csharp
if (!provider.WriteMessageEvent("Event string."))
Console.WriteLine(EventProvider.GetLastWriteEventError());
```
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">If <paramref name="eventMessage" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="WriteMessageEvent">
<MemberSignature Language="C#" Value="public bool WriteMessageEvent (string eventMessage, byte eventLevel, long eventKeywords);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool WriteMessageEvent(string eventMessage, unsigned int8 eventLevel, int64 eventKeywords) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.WriteMessageEvent(System.String,System.Byte,System.Int64)" />
<MemberSignature Language="VB.NET" Value="Public Function WriteMessageEvent (eventMessage As String, eventLevel As Byte, eventKeywords As Long) As Boolean" />
<MemberSignature Language="F#" Value="member this.WriteMessageEvent : string * byte * int64 -> bool" Usage="eventProvider.WriteMessageEvent (eventMessage, eventLevel, eventKeywords)" />
<MemberSignature Language="C++ CLI" Value="public:
 bool WriteMessageEvent(System::String ^ eventMessage, System::Byte eventLevel, long eventKeywords);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventMessage" Type="System.String" />
<Parameter Name="eventLevel" Type="System.Byte" />
<Parameter Name="eventKeywords" Type="System.Int64" />
</Parameters>
<Docs>
<param name="eventMessage">String to write as the event data.</param>
<param name="eventLevel">Level of detail included in the event. If the provider uses a manifest to define the event, set this value to the same level defined in the manifest.</param>
<param name="eventKeywords">Bit mask that specifies the event category. If the provider uses a manifest to define the event, set this value to the same keyword mask defined in the manifest.</param>
<summary>Writes an event that contains a string as its data if the level and keyword value match the events requested by the session.</summary>
<returns>Is <see langword="true" /> if the event is written; otherwise, <see langword="false" />. If false, call the <see cref="M:System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError" /> method to determine the cause of the failure.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The maximum string length is limited to 64 KB minus the size of the event headers. The event size is less if the session's buffer size is less and the session includes extended data items with the event.
## Examples
```csharp
// Calling this method with level and keyword set to zero is the same
// as calling WriteMessageEvent(string); the event is always written.
if (!provider.WriteMessageEvent("Event string.", 0, 0))
Console.WriteLine(EventProvider.GetLastWriteEventError());
// Event is written if the level value of the session is less than or equal to 3, and bit 1 of the session
// keyword bit-mask is set.
if (!provider.WriteMessageEvent("Event string.", 3, 2))
Console.WriteLine(EventProvider.GetLastWriteEventError());
```
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">If <paramref name="eventMessage" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<MemberGroup MemberName="WriteTransferEvent">
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Links events together when tracing events in an end-to-end scenario.</summary>
</Docs>
</MemberGroup>
<Member MemberName="WriteTransferEvent">
<MemberSignature Language="C#" Value="public bool WriteTransferEvent (ref System.Diagnostics.Eventing.EventDescriptor eventDescriptor, Guid relatedActivityId, params object[] eventPayload);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool WriteTransferEvent(valuetype System.Diagnostics.Eventing.EventDescriptor& eventDescriptor, valuetype System.Guid relatedActivityId, object[] eventPayload) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.WriteTransferEvent(System.Diagnostics.Eventing.EventDescriptor@,System.Guid,System.Object[])" />
<MemberSignature Language="VB.NET" Value="Public Function WriteTransferEvent (ByRef eventDescriptor As EventDescriptor, relatedActivityId As Guid, ParamArray eventPayload As Object()) As Boolean" />
<MemberSignature Language="F#" Value="member this.WriteTransferEvent : EventDescriptor * Guid * obj[] -> bool" Usage="eventProvider.WriteTransferEvent (eventDescriptor, relatedActivityId, eventPayload)" />
<MemberSignature Language="C++ CLI" Value="public:
 bool WriteTransferEvent(System::Diagnostics::Eventing::EventDescriptor % eventDescriptor, Guid relatedActivityId, ... cli::array <System::Object ^> ^ eventPayload);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventDescriptor" Type="System.Diagnostics.Eventing.EventDescriptor" RefType="ref" />
<Parameter Name="relatedActivityId" Type="System.Guid" />
<Parameter Name="eventPayload" Type="System.Object[]">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ParamArray]</AttributeName>
<AttributeName Language="F#">[<System.ParamArray>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="eventDescriptor">An instance of <see cref="T:System.Diagnostics.Eventing.EventDescriptor" /> that identifies the event to write.</param>
<param name="relatedActivityId">Activity identifier from the previous component. Use this parameter to link your component's events to the previous component's events.</param>
<param name="eventPayload">An array of objects that contain the event data to write. The data must be in the order specified in the manifest. The array is limited to 32 objects, of which only eight may be strings. The maximum data size for the event is limited to 64 KB minus the size of the event headers. The event size is less if the session's buffer size is less and the session includes extended data items with the event.</param>
<summary>Links events together when tracing events in an end-to-end scenario. The event data is specified as an array of objects.</summary>
<returns>Is <see langword="true" /> if the event is written; otherwise, <see langword="false" />. If false, call the <see cref="M:System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError" /> method to determine the cause of the failure.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The method uses the activity ID set in the thread context to identify this component. To set the activity ID, call the <xref:System.Diagnostics.Eventing.EventProvider.SetActivityId%2A> method.
If you use the <xref:System.Diagnostics.Trace> class, you do not use the <xref:System.Diagnostics.Eventing.EventProvider.SetActivityId%2A> method to specify the activity ID. Instead, access the <xref:System.Diagnostics.Trace.CorrelationManager%2A> property to get the <xref:System.Diagnostics.CorrelationManager> object. Then, set the <xref:System.Diagnostics.CorrelationManager.ActivityId%2A> property to the activity ID. You must also set the `relatedActivityId` to a <xref:System.Diagnostics.CorrelationManager.ActivityId%2A> value.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">If <paramref name="eventPayload" /> contains too many objects or strings.</exception>
</Docs>
</Member>
<Member MemberName="WriteTransferEvent">
<MemberSignature Language="C#" Value="protected bool WriteTransferEvent (ref System.Diagnostics.Eventing.EventDescriptor eventDescriptor, Guid relatedActivityId, int dataCount, IntPtr data);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance bool WriteTransferEvent(valuetype System.Diagnostics.Eventing.EventDescriptor& eventDescriptor, valuetype System.Guid relatedActivityId, int32 dataCount, native int data) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Eventing.EventProvider.WriteTransferEvent(System.Diagnostics.Eventing.EventDescriptor@,System.Guid,System.Int32,System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Protected Function WriteTransferEvent (ByRef eventDescriptor As EventDescriptor, relatedActivityId As Guid, dataCount As Integer, data As IntPtr) As Boolean" />
<MemberSignature Language="F#" Value="member this.WriteTransferEvent : EventDescriptor * Guid * int * nativeint -> bool" Usage="eventProvider.WriteTransferEvent (eventDescriptor, relatedActivityId, dataCount, data)" />
<MemberSignature Language="C++ CLI" Value="protected:
 bool WriteTransferEvent(System::Diagnostics::Eventing::EventDescriptor % eventDescriptor, Guid relatedActivityId, int dataCount, IntPtr data);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Core</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventDescriptor" Type="System.Diagnostics.Eventing.EventDescriptor" RefType="ref" />
<Parameter Name="relatedActivityId" Type="System.Guid" />
<Parameter Name="dataCount" Type="System.Int32" />
<Parameter Name="data" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="eventDescriptor">An instance of <see cref="T:System.Diagnostics.Eventing.EventDescriptor" /> that identifies the event to write.</param>
<param name="relatedActivityId">Activity identifier from the previous component. Use this parameter to link your component's events to the previous component's events.</param>
<param name="dataCount">Size of the event data to which the <paramref name="data" /> parameter points. The maximum event data size is limited to 64 KB minus the size of the event headers. The event size is less if the session's buffer size is less and the session includes extended data items with the event.</param>
<param name="data">Pointer to the event data to write.</param>
<summary>Links events together when tracing events in an end-to-end scenario. The event data is specified as a block of memory.</summary>
<returns>Is <see langword="true" /> if the event is written; otherwise, <see langword="false" />. If false, call the <see cref="M:System.Diagnostics.Eventing.EventProvider.GetLastWriteEventError" /> method to determine the cause of the failure.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The method uses the activity ID set in the thread context to identify this component. To set the activity ID, call the <xref:System.Diagnostics.Eventing.EventProvider.SetActivityId%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>