1 //------------------------------------------------------------------------------
3 // This code was generated by a tool.
5 // Changes to this file may cause incorrect behavior and will be lost if
6 // the code is regenerated.
8 //------------------------------------------------------------------------------
10 namespace System.Activities.DurableInstancing
13 using System.Runtime.Diagnostics;
14 using System.Security;
17 internal partial class TD
20 static System.Resources.ResourceManager resourceManager;
22 static System.Globalization.CultureInfo resourceCulture;
24 [System.Security.SecurityCriticalAttribute()]
25 static System.Runtime.Diagnostics.EventDescriptor[] eventDescriptors;
27 static object syncLock = new object();
29 // Double-checked locking pattern requires volatile for read/write synchronization
30 static volatile bool eventDescriptorsCreated;
36 [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification="This is an auto-generated code, some ETW/TraceSource mixed code would use it.")]
37 static System.Resources.ResourceManager ResourceManager
41 if (object.ReferenceEquals(resourceManager, null))
43 resourceManager = new System.Resources.ResourceManager("System.Activities.DurableInstancing.TD", typeof(TD).Assembly);
45 return resourceManager;
49 [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification="This template is shared across all assemblies, some of which use this accessor.")]
50 internal static System.Globalization.CultureInfo Culture
54 return resourceCulture;
58 resourceCulture = value;
63 /// Check if trace definition is enabled
64 /// Event description ID=4201, Level=Verbose, Channel=debug
66 internal static bool EndSqlCommandExecuteIsEnabled()
68 return (FxTrace.ShouldTraceVerbose
69 && (FxTrace.ShouldTraceVerboseToTraceSource || TD.IsEtwEventEnabled(0)));
73 /// Gets trace definition like: End SQL command execution: {0}
74 /// Event description ID=4201, Level=Verbose, Channel=debug
76 /// <param name="param0">Parameter 0 for event: End SQL command execution: {0}</param>
77 internal static void EndSqlCommandExecute(string param0)
79 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
80 if (TD.IsEtwEventEnabled(0))
82 TD.WriteEtwEvent(0, null, param0, payload.AppDomainFriendlyName);
84 if (FxTrace.ShouldTraceVerboseToTraceSource)
86 string description = string.Format(Culture, ResourceManager.GetString("EndSqlCommandExecute", Culture), param0);
87 TD.WriteTraceSource(0, description, payload);
92 /// Check if trace definition is enabled
93 /// Event description ID=4202, Level=Verbose, Channel=debug
95 internal static bool StartSqlCommandExecuteIsEnabled()
97 return (FxTrace.ShouldTraceVerbose
98 && (FxTrace.ShouldTraceVerboseToTraceSource || TD.IsEtwEventEnabled(1)));
102 /// Gets trace definition like: Starting SQL command execution: {0}
103 /// Event description ID=4202, Level=Verbose, Channel=debug
105 /// <param name="param0">Parameter 0 for event: Starting SQL command execution: {0}</param>
106 internal static void StartSqlCommandExecute(string param0)
108 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
109 if (TD.IsEtwEventEnabled(1))
111 TD.WriteEtwEvent(1, null, param0, payload.AppDomainFriendlyName);
113 if (FxTrace.ShouldTraceVerboseToTraceSource)
115 string description = string.Format(Culture, ResourceManager.GetString("StartSqlCommandExecute", Culture), param0);
116 TD.WriteTraceSource(1, description, payload);
121 /// Check if trace definition is enabled
122 /// Event description ID=4203, Level=Error, Channel=debug
124 internal static bool RenewLockSystemErrorIsEnabled()
126 return (FxTrace.ShouldTraceError
127 && (FxTrace.ShouldTraceErrorToTraceSource || TD.IsEtwEventEnabled(2)));
131 /// Gets trace definition like: Failed to extend lock expiration, lock expiration already passed or the lock owner was deleted. Aborting SqlWorkflowInstanceStore.
132 /// Event description ID=4203, Level=Error, Channel=debug
134 internal static void RenewLockSystemError()
136 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
137 if (TD.IsEtwEventEnabled(2))
139 TD.WriteEtwEvent(2, null, payload.AppDomainFriendlyName);
141 if (FxTrace.ShouldTraceErrorToTraceSource)
143 string description = string.Format(Culture, ResourceManager.GetString("RenewLockSystemError", Culture));
144 TD.WriteTraceSource(2, description, payload);
149 /// Check if trace definition is enabled
150 /// Event description ID=4205, Level=Error, Channel=debug
152 internal static bool FoundProcessingErrorIsEnabled()
154 return (FxTrace.ShouldTraceError
155 && (FxTrace.ShouldTraceErrorToTraceSource || TD.IsEtwEventEnabled(3)));
159 /// Gets trace definition like: Command failed: {0}
160 /// Event description ID=4205, Level=Error, Channel=debug
162 /// <param name="eventTraceActivity">The event trace activity</param>
163 /// <param name="param0">Parameter 0 for event: Command failed: {0}</param>
164 /// <param name="exception">Exception associated with the event</param>
165 internal static void FoundProcessingError(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string param0, System.Exception exception)
167 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, exception);
168 if (TD.IsEtwEventEnabled(3))
170 TD.WriteEtwEvent(3, eventTraceActivity, param0, payload.SerializedException, payload.AppDomainFriendlyName);
172 if (FxTrace.ShouldTraceErrorToTraceSource)
174 string description = string.Format(Culture, ResourceManager.GetString("FoundProcessingError", Culture), param0);
175 TD.WriteTraceSource(3, description, payload);
180 /// Check if trace definition is enabled
181 /// Event description ID=4206, Level=Error, Channel=debug
183 internal static bool UnlockInstanceExceptionIsEnabled()
185 return (FxTrace.ShouldTraceError
186 && (FxTrace.ShouldTraceErrorToTraceSource || TD.IsEtwEventEnabled(4)));
190 /// Gets trace definition like: Encountered exception {0} while attempting to unlock instance.
191 /// Event description ID=4206, Level=Error, Channel=debug
193 /// <param name="param0">Parameter 0 for event: Encountered exception {0} while attempting to unlock instance.</param>
194 internal static void UnlockInstanceException(string param0)
196 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
197 if (TD.IsEtwEventEnabled(4))
199 TD.WriteEtwEvent(4, null, param0, payload.AppDomainFriendlyName);
201 if (FxTrace.ShouldTraceErrorToTraceSource)
203 string description = string.Format(Culture, ResourceManager.GetString("UnlockInstanceException", Culture), param0);
204 TD.WriteTraceSource(4, description, payload);
209 /// Check if trace definition is enabled
210 /// Event description ID=4207, Level=Informational, Channel=debug
212 internal static bool MaximumRetriesExceededForSqlCommandIsEnabled()
214 return (FxTrace.ShouldTraceInformation
215 && (FxTrace.ShouldTraceInformationToTraceSource || TD.IsEtwEventEnabled(5)));
219 /// Gets trace definition like: Giving up retrying a SQL command as the maximum number of retries have been performed.
220 /// Event description ID=4207, Level=Informational, Channel=debug
222 /// <param name="eventTraceActivity">The event trace activity</param>
223 internal static void MaximumRetriesExceededForSqlCommand(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity)
225 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
226 if (TD.IsEtwEventEnabled(5))
228 TD.WriteEtwEvent(5, eventTraceActivity, payload.AppDomainFriendlyName);
230 if (FxTrace.ShouldTraceInformationToTraceSource)
232 string description = string.Format(Culture, ResourceManager.GetString("MaximumRetriesExceededForSqlCommand", Culture));
233 TD.WriteTraceSource(5, description, payload);
238 /// Check if trace definition is enabled
239 /// Event description ID=4208, Level=Informational, Channel=debug
241 internal static bool RetryingSqlCommandDueToSqlErrorIsEnabled()
243 return (FxTrace.ShouldTraceInformation
244 && (FxTrace.ShouldTraceInformationToTraceSource || TD.IsEtwEventEnabled(6)));
248 /// Gets trace definition like: Retrying a SQL command due to SQL error number {0}.
249 /// Event description ID=4208, Level=Informational, Channel=debug
251 /// <param name="eventTraceActivity">The event trace activity</param>
252 /// <param name="param0">Parameter 0 for event: Retrying a SQL command due to SQL error number {0}.</param>
253 internal static void RetryingSqlCommandDueToSqlError(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string param0)
255 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
256 if (TD.IsEtwEventEnabled(6))
258 TD.WriteEtwEvent(6, eventTraceActivity, param0, payload.AppDomainFriendlyName);
260 if (FxTrace.ShouldTraceInformationToTraceSource)
262 string description = string.Format(Culture, ResourceManager.GetString("RetryingSqlCommandDueToSqlError", Culture), param0);
263 TD.WriteTraceSource(6, description, payload);
268 /// Check if trace definition is enabled
269 /// Event description ID=4209, Level=Error, Channel=debug
271 internal static bool TimeoutOpeningSqlConnectionIsEnabled()
273 return (FxTrace.ShouldTraceError
274 && (FxTrace.ShouldTraceErrorToTraceSource || TD.IsEtwEventEnabled(7)));
278 /// Gets trace definition like: Timeout trying to open a SQL connection. The operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.
279 /// Event description ID=4209, Level=Error, Channel=debug
281 /// <param name="eventTraceActivity">The event trace activity</param>
282 /// <param name="param0">Parameter 0 for event: Timeout trying to open a SQL connection. The operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.</param>
283 internal static void TimeoutOpeningSqlConnection(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string param0)
285 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
286 if (TD.IsEtwEventEnabled(7))
288 TD.WriteEtwEvent(7, eventTraceActivity, param0, payload.AppDomainFriendlyName);
290 if (FxTrace.ShouldTraceErrorToTraceSource)
292 string description = string.Format(Culture, ResourceManager.GetString("TimeoutOpeningSqlConnection", Culture), param0);
293 TD.WriteTraceSource(7, description, payload);
298 /// Check if trace definition is enabled
299 /// Event description ID=4210, Level=Warning, Channel=debug
301 internal static bool SqlExceptionCaughtIsEnabled()
303 return (FxTrace.ShouldTraceWarning
304 && (FxTrace.ShouldTraceWarningToTraceSource || TD.IsEtwEventEnabled(8)));
308 /// Gets trace definition like: Caught SQL Exception number {0} message {1}.
309 /// Event description ID=4210, Level=Warning, Channel=debug
311 /// <param name="eventTraceActivity">The event trace activity</param>
312 /// <param name="param0">Parameter 0 for event: Caught SQL Exception number {0} message {1}.</param>
313 /// <param name="param1">Parameter 1 for event: Caught SQL Exception number {0} message {1}.</param>
314 internal static void SqlExceptionCaught(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string param0, string param1)
316 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
317 if (TD.IsEtwEventEnabled(8))
319 TD.WriteEtwEvent(8, eventTraceActivity, param0, param1, payload.AppDomainFriendlyName);
321 if (FxTrace.ShouldTraceWarningToTraceSource)
323 string description = string.Format(Culture, ResourceManager.GetString("SqlExceptionCaught", Culture), param0, param1);
324 TD.WriteTraceSource(8, description, payload);
329 /// Check if trace definition is enabled
330 /// Event description ID=4212, Level=Warning, Channel=debug
332 internal static bool LockRetryTimeoutIsEnabled()
334 return (FxTrace.ShouldTraceWarning
335 && (FxTrace.ShouldTraceWarningToTraceSource || TD.IsEtwEventEnabled(9)));
339 /// Gets trace definition like: Timeout trying to acquire the instance lock. The operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.
340 /// Event description ID=4212, Level=Warning, Channel=debug
342 /// <param name="eventTraceActivity">The event trace activity</param>
343 /// <param name="param0">Parameter 0 for event: Timeout trying to acquire the instance lock. The operation did not complete within the allotted timeout of {0}. The time allotted to this operation may have been a portion of a longer timeout.</param>
344 internal static void LockRetryTimeout(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string param0)
346 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
347 if (TD.IsEtwEventEnabled(9))
349 TD.WriteEtwEvent(9, eventTraceActivity, param0, payload.AppDomainFriendlyName);
351 if (FxTrace.ShouldTraceWarningToTraceSource)
353 string description = string.Format(Culture, ResourceManager.GetString("LockRetryTimeout", Culture), param0);
354 TD.WriteTraceSource(9, description, payload);
359 /// Check if trace definition is enabled
360 /// Event description ID=4211, Level=Warning, Channel=debug
362 internal static bool QueuingSqlRetryIsEnabled()
364 return (FxTrace.ShouldTraceWarning
365 && (FxTrace.ShouldTraceWarningToTraceSource || TD.IsEtwEventEnabled(10)));
369 /// Gets trace definition like: Queuing SQL retry with delay {0} milliseconds.
370 /// Event description ID=4211, Level=Warning, Channel=debug
372 /// <param name="eventTraceActivity">The event trace activity</param>
373 /// <param name="param0">Parameter 0 for event: Queuing SQL retry with delay {0} milliseconds.</param>
374 internal static void QueuingSqlRetry(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string param0)
376 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);
377 if (TD.IsEtwEventEnabled(10))
379 TD.WriteEtwEvent(10, eventTraceActivity, param0, payload.AppDomainFriendlyName);
381 if (FxTrace.ShouldTraceWarningToTraceSource)
383 string description = string.Format(Culture, ResourceManager.GetString("QueuingSqlRetry", Culture), param0);
384 TD.WriteTraceSource(10, description, payload);
389 /// Check if trace definition is enabled
390 /// Event description ID=4213, Level=Error, Channel=debug
392 internal static bool RunnableInstancesDetectionErrorIsEnabled()
394 return (FxTrace.ShouldTraceError
395 && (FxTrace.ShouldTraceErrorToTraceSource || TD.IsEtwEventEnabled(11)));
399 /// Gets trace definition like: Detection of runnable instances failed due to the following exception
400 /// Event description ID=4213, Level=Error, Channel=debug
402 /// <param name="exception">Exception associated with the event</param>
403 internal static void RunnableInstancesDetectionError(System.Exception exception)
405 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, exception);
406 if (TD.IsEtwEventEnabled(11))
408 TD.WriteEtwEvent(11, null, payload.SerializedException, payload.AppDomainFriendlyName);
410 if (FxTrace.ShouldTraceErrorToTraceSource)
412 string description = string.Format(Culture, ResourceManager.GetString("RunnableInstancesDetectionError", Culture));
413 TD.WriteTraceSource(11, description, payload);
418 /// Check if trace definition is enabled
419 /// Event description ID=4214, Level=Error, Channel=debug
421 internal static bool InstanceLocksRecoveryErrorIsEnabled()
423 return (FxTrace.ShouldTraceError
424 && (FxTrace.ShouldTraceErrorToTraceSource || TD.IsEtwEventEnabled(12)));
428 /// Gets trace definition like: Recovering instance locks failed due to the following exception
429 /// Event description ID=4214, Level=Error, Channel=debug
431 /// <param name="exception">Exception associated with the event</param>
432 internal static void InstanceLocksRecoveryError(System.Exception exception)
434 TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, exception);
435 if (TD.IsEtwEventEnabled(12))
437 TD.WriteEtwEvent(12, null, payload.SerializedException, payload.AppDomainFriendlyName);
439 if (FxTrace.ShouldTraceErrorToTraceSource)
441 string description = string.Format(Culture, ResourceManager.GetString("InstanceLocksRecoveryError", Culture));
442 TD.WriteTraceSource(12, description, payload);
447 /// Creates the event descriptors array
449 // Critical = Sets the SecurityCritical member eventDescriptors
450 // Safe = We control what the event descriptors contain
451 [System.Security.SecuritySafeCriticalAttribute()]
452 static void CreateEventDescriptors()
454 System.Runtime.Diagnostics.EventDescriptor[] descriptors = new System.Runtime.Diagnostics.EventDescriptor[] {
455 new System.Runtime.Diagnostics.EventDescriptor(4201, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Stop, 0xa1d, 0x1000000008000000),
456 new System.Runtime.Diagnostics.EventDescriptor(4202, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Verbose, (byte)TraceEventOpcode.Start, 0xa1d, 0x1000000008000000),
457 new System.Runtime.Diagnostics.EventDescriptor(4203, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0x9f9, 0x1000000008000000),
458 new System.Runtime.Diagnostics.EventDescriptor(4205, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0xa1d, 0x1000000008000000),
459 new System.Runtime.Diagnostics.EventDescriptor(4206, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0x9f9, 0x1000000008000000),
460 new System.Runtime.Diagnostics.EventDescriptor(4207, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa1d, 0x1000000008400000),
461 new System.Runtime.Diagnostics.EventDescriptor(4208, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa1d, 0x1000000008000000),
462 new System.Runtime.Diagnostics.EventDescriptor(4209, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0xa1d, 0x1000000008000000),
463 new System.Runtime.Diagnostics.EventDescriptor(4210, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)TraceEventOpcode.Info, 0xa1d, 0x1000000008000000),
464 new System.Runtime.Diagnostics.EventDescriptor(4212, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)TraceEventOpcode.Info, 0xa1d, 0x1000000008000000),
465 new System.Runtime.Diagnostics.EventDescriptor(4211, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Warning, (byte)TraceEventOpcode.Info, 0x9f9, 0x1000000008000000),
466 new System.Runtime.Diagnostics.EventDescriptor(4213, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0x9f9, 0x1000000008000000),
467 new System.Runtime.Diagnostics.EventDescriptor(4214, 0, (byte)TraceChannel.Debug, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0x9f9, 0x1000000008000000)};
468 // The hashcodes calculated from PTCop for TD.CreateEventDescriptors are unstable when just declaring
469 // a local field of ushort[] if the array is non-empty and contains more than 2 entries, because
470 // the c#-compiler is using some private types for optimization. The type name follows the following pattern:
471 // <PrivateImplementationDetails>{6BAE93FD-290B-4DE0-BCEE-366B30800FDF} (where the GUID is changing with every build)
472 // To scope the change to unblock PTCop as much as possible we wrap the list of End2EndEvents in a List<ushort>
473 System.Collections.Generic.List<ushort> e2eEvents = new System.Collections.Generic.List<ushort>(7);
481 FxTrace.UpdateEventDefinitions(descriptors, e2eEvents.ToArray());
482 eventDescriptors = descriptors;
486 /// Ensures that the event descriptors array is initialized
488 static void EnsureEventDescriptors()
490 if (eventDescriptorsCreated)
494 System.Threading.Monitor.Enter(syncLock);
497 if (eventDescriptorsCreated)
501 CreateEventDescriptors();
502 eventDescriptorsCreated = true;
506 System.Threading.Monitor.Exit(syncLock);
511 /// Check if ETW tracing is enabled for the particular event
513 /// <param name="eventIndex">The index of the event descriptor</param>
514 static bool IsEtwEventEnabled(int eventIndex)
516 if (FxTrace.Trace.IsEtwProviderEnabled)
518 EnsureEventDescriptors();
519 return FxTrace.IsEventEnabled(eventIndex);
525 /// Writes ETW trace event
527 /// <param name="eventIndex">The index of the event descriptor</param>>
528 /// <param name="eventParam0">A parameter of the ETW event</param>>
529 /// <param name="eventParam1">A parameter of the ETW event</param>>
530 /// <param name="eventParam2">A parameter of the ETW event</param>>
531 // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
532 // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
533 [System.Security.SecuritySafeCriticalAttribute()]
534 static bool WriteEtwEvent(int eventIndex, System.Runtime.Diagnostics.EventTraceActivity eventParam0, string eventParam1, string eventParam2)
536 EnsureEventDescriptors();
537 return FxTrace.Trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2);
541 /// Writes ETW trace event
543 /// <param name="eventIndex">The index of the event descriptor</param>>
544 /// <param name="eventParam0">A parameter of the ETW event</param>>
545 /// <param name="eventParam1">A parameter of the ETW event</param>>
546 // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
547 // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
548 [System.Security.SecuritySafeCriticalAttribute()]
549 static bool WriteEtwEvent(int eventIndex, System.Runtime.Diagnostics.EventTraceActivity eventParam0, string eventParam1)
551 EnsureEventDescriptors();
552 return FxTrace.Trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1);
556 /// Writes ETW trace event
558 /// <param name="eventIndex">The index of the event descriptor</param>>
559 /// <param name="eventParam0">A parameter of the ETW event</param>>
560 /// <param name="eventParam1">A parameter of the ETW event</param>>
561 /// <param name="eventParam2">A parameter of the ETW event</param>>
562 /// <param name="eventParam3">A parameter of the ETW event</param>>
563 // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
564 // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
565 [System.Security.SecuritySafeCriticalAttribute()]
566 static bool WriteEtwEvent(int eventIndex, System.Runtime.Diagnostics.EventTraceActivity eventParam0, string eventParam1, string eventParam2, string eventParam3)
568 EnsureEventDescriptors();
569 return FxTrace.Trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3);
573 /// write a trace source into the diagnostic trace
575 /// <param name="eventIndex">The index of the event descriptor</param>
576 /// <param name="description">The description to write</param>
577 /// <param name="payload">The trace payload</param>
578 // Critical = Calls SecurityCritical method EtwDiagnosticTrace.WriteTraceSource
579 // Safe = We only allow setting of provider id from SecurityCritical code
580 [System.Security.SecuritySafeCriticalAttribute()]
581 static void WriteTraceSource(int eventIndex, string description, TracePayload payload)
583 EnsureEventDescriptors();
584 FxTrace.Trace.WriteTraceSource(ref eventDescriptors[eventIndex], description, payload);