//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace System.Activities
{
    using System.Runtime;
    using System.Runtime.Diagnostics;
    using System.Security;
    
    
    internal partial class EtwTrackingParticipantTrackRecords
    {
        
        static System.Resources.ResourceManager resourceManager;
        
        static System.Globalization.CultureInfo resourceCulture;
        
        [System.Security.SecurityCriticalAttribute()]
        static System.Runtime.Diagnostics.EventDescriptor[] eventDescriptors;
        
        static object syncLock = new object();
        
        // Double-checked locking pattern requires volatile for read/write synchronization
        static volatile bool eventDescriptorsCreated;
        
        private EtwTrackingParticipantTrackRecords()
        {
        }
        
        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification="This is an auto-generated code, some ETW/TraceSource mixed code would use it.")]
        static System.Resources.ResourceManager ResourceManager
        {
            get
            {
                if (object.ReferenceEquals(resourceManager, null))
                {
                    resourceManager = new System.Resources.ResourceManager("System.Activities.EtwTrackingParticipantTrackRecords", typeof(EtwTrackingParticipantTrackRecords).Assembly);
                }
                return resourceManager;
            }
        }
        
        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification="This template is shared across all assemblies, some of which use this accessor.")]
        internal static System.Globalization.CultureInfo Culture
        {
            get
            {
                return resourceCulture;
            }
            set
            {
                resourceCulture = value;
            }
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=104, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool ActivityScheduledRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 0);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}
        /// Event description ID=104, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="Name">Parameter 3 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ActivityId">Parameter 4 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ActivityInstanceId">Parameter 5 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ActivityTypeName">Parameter 6 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ChildActivityName">Parameter 7 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ChildActivityId">Parameter 8 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ChildActivityInstanceId">Parameter 9 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ChildActivityTypeName">Parameter 10 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="Annotations">Parameter 11 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ProfileName">Parameter 12 for event: TrackRecord = ActivityScheduledRecord, InstanceID = {0},  RecordNumber = {1}, EventTime = {2}, Name = {3}, ActivityId = {4}, ActivityInstanceId = {5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool ActivityScheduledRecord(
                    EtwDiagnosticTrace trace, 
                    System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, 
                    System.Guid InstanceId, 
                    long RecordNumber, 
                    long EventTime, 
                    string Name, 
                    string ActivityId, 
                    string ActivityInstanceId, 
                    string ActivityTypeName, 
                    string ChildActivityName, 
                    string ChildActivityId, 
                    string ChildActivityInstanceId, 
                    string ChildActivityTypeName, 
                    string Annotations, 
                    string ProfileName, 
                    string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 0))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 0, eventTraceActivity, InstanceId, RecordNumber, EventTime, Name, ActivityId, ActivityInstanceId, ActivityTypeName, ChildActivityName, ChildActivityId, ChildActivityInstanceId, ChildActivityTypeName, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=103, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool ActivityStateRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 1);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}
        /// Event description ID=103, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="State">Parameter 3 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="Name">Parameter 4 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="ActivityId">Parameter 5 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="ActivityInstanceId">Parameter 6 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="ActivityTypeName">Parameter 7 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="Arguments">Parameter 8 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="Variables">Parameter 9 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="Annotations">Parameter 10 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="ProfileName">Parameter 11 for event: TrackRecord = ActivityStateRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, State = {3}, Name={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Arguments={8}, Variables={9}, Annotations={10}, ProfileName = {11}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool ActivityStateRecord(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string State, string Name, string ActivityId, string ActivityInstanceId, string ActivityTypeName, string Arguments, string Variables, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 1))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 1, eventTraceActivity, InstanceId, RecordNumber, EventTime, State, Name, ActivityId, ActivityInstanceId, ActivityTypeName, Arguments, Variables, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=107, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool BookmarkResumptionRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 2);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}
        /// Event description ID=107, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Name">Parameter 3 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="SubInstanceID">Parameter 4 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="OwnerActivityName">Parameter 5 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="OwnerActivityId">Parameter 6 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="OwnerActivityInstanceId">Parameter 7 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="OwnerActivityTypeName">Parameter 8 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Annotations">Parameter 9 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ProfileName">Parameter 10 for event: TrackRecord = BookmarkResumptionRecord, InstanceID={0}, RecordNumber={1},EventTime={2}, Name={3}, SubInstanceID={4},  OwnerActivityName={5}, OwnerActivityId ={6}, OwnerActivityInstanceId={7}, OwnerActivityTypeName={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool BookmarkResumptionRecord(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string Name, System.Guid SubInstanceID, string OwnerActivityName, string OwnerActivityId, string OwnerActivityInstanceId, string OwnerActivityTypeName, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 2))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 2, eventTraceActivity, InstanceId, RecordNumber, EventTime, Name, SubInstanceID, OwnerActivityName, OwnerActivityId, OwnerActivityInstanceId, OwnerActivityTypeName, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=106, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool CancelRequestedRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 3);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}
        /// Event description ID=106, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="Name">Parameter 3 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ActivityId">Parameter 4 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ActivityInstanceId">Parameter 5 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ActivityTypeName">Parameter 6 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ChildActivityName">Parameter 7 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ChildActivityId">Parameter 8 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ChildActivityInstanceId">Parameter 9 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ChildActivityTypeName">Parameter 10 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="Annotations">Parameter 11 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="ProfileName">Parameter 12 for event: TrackRecord = CancelRequestedRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityId={4}, ActivityInstanceId={5}, ActivityTypeName = {6}, ChildActivityName = {7}, ChildActivityId = {8}, ChildActivityInstanceId = {9}, ChildActivityTypeName ={10}, Annotations={11}, ProfileName = {12}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool CancelRequestedRecord(
                    EtwDiagnosticTrace trace, 
                    System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, 
                    System.Guid InstanceId, 
                    long RecordNumber, 
                    long EventTime, 
                    string Name, 
                    string ActivityId, 
                    string ActivityInstanceId, 
                    string ActivityTypeName, 
                    string ChildActivityName, 
                    string ChildActivityId, 
                    string ChildActivityInstanceId, 
                    string ChildActivityTypeName, 
                    string Annotations, 
                    string ProfileName, 
                    string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 3))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 3, eventTraceActivity, InstanceId, RecordNumber, EventTime, Name, ActivityId, ActivityInstanceId, ActivityTypeName, ChildActivityName, ChildActivityId, ChildActivityInstanceId, ChildActivityTypeName, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=105, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool FaultPropagationRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 4);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}
        /// Event description ID=105, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="FaultSourceActivityName">Parameter 3 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="FaultSourceActivityId">Parameter 4 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="FaultSourceActivityInstanceId">Parameter 5 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="FaultSourceActivityTypeName">Parameter 6 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="FaultHandlerActivityName">Parameter 7 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="FaultHandlerActivityId">Parameter 8 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="FaultHandlerActivityInstanceId">Parameter 9 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="FaultHandlerActivityTypeName">Parameter 10 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="Fault">Parameter 11 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="IsFaultSource">Parameter 12 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="Annotations">Parameter 13 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="ProfileName">Parameter 14 for event: TrackRecord = FaultPropagationRecord, InstanceID={0}, RecordNumber={1}, EventTime={2}, FaultSourceActivityName={3}, FaultSourceActivityId={4}, FaultSourceActivityInstanceId={5}, FaultSourceActivityTypeName={6}, FaultHandlerActivityName={7},  FaultHandlerActivityId = {8}, FaultHandlerActivityInstanceId ={9}, FaultHandlerActivityTypeName={10}, Fault={11}, IsFaultSource={12}, Annotations={13}, ProfileName = {14}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool FaultPropagationRecord(
                    EtwDiagnosticTrace trace, 
                    System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, 
                    System.Guid InstanceId, 
                    long RecordNumber, 
                    long EventTime, 
                    string FaultSourceActivityName, 
                    string FaultSourceActivityId, 
                    string FaultSourceActivityInstanceId, 
                    string FaultSourceActivityTypeName, 
                    string FaultHandlerActivityName, 
                    string FaultHandlerActivityId, 
                    string FaultHandlerActivityInstanceId, 
                    string FaultHandlerActivityTypeName, 
                    string Fault, 
                    bool IsFaultSource, 
                    string Annotations, 
                    string ProfileName, 
                    string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 4))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 4, eventTraceActivity, InstanceId, RecordNumber, EventTime, FaultSourceActivityName, FaultSourceActivityId, FaultSourceActivityInstanceId, FaultSourceActivityTypeName, FaultHandlerActivityName, FaultHandlerActivityId, FaultHandlerActivityInstanceId, FaultHandlerActivityTypeName, Fault, IsFaultSource, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=108, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool CustomTrackingRecordInfoIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 5);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}
        /// Event description ID=108, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Name">Parameter 3 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityName">Parameter 4 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityId">Parameter 5 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityInstanceId">Parameter 6 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityTypeName">Parameter 7 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Data">Parameter 8 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Annotations">Parameter 9 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ProfileName">Parameter 10 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2},  Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool CustomTrackingRecordInfo(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string Name, string ActivityName, string ActivityId, string ActivityInstanceId, string ActivityTypeName, string Data, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 5))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 5, eventTraceActivity, InstanceId, RecordNumber, EventTime, Name, ActivityName, ActivityId, ActivityInstanceId, ActivityTypeName, Data, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=111, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool CustomTrackingRecordErrorIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 6);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}
        /// Event description ID=111, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Name">Parameter 3 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityName">Parameter 4 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityId">Parameter 5 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityInstanceId">Parameter 6 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityTypeName">Parameter 7 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Data">Parameter 8 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Annotations">Parameter 9 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ProfileName">Parameter 10 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool CustomTrackingRecordError(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string Name, string ActivityName, string ActivityId, string ActivityInstanceId, string ActivityTypeName, string Data, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 6))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 6, eventTraceActivity, InstanceId, RecordNumber, EventTime, Name, ActivityName, ActivityId, ActivityInstanceId, ActivityTypeName, Data, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=110, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool CustomTrackingRecordWarningIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 7);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}
        /// Event description ID=110, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Name">Parameter 3 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityName">Parameter 4 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityId">Parameter 5 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityInstanceId">Parameter 6 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ActivityTypeName">Parameter 7 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Data">Parameter 8 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="Annotations">Parameter 9 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="ProfileName">Parameter 10 for event: TrackRecord = CustomTrackingRecord, InstanceID = {0}, RecordNumber={1}, EventTime={2}, Name={3}, ActivityName={4}, ActivityId={5}, ActivityInstanceId={6}, ActivityTypeName={7}, Data={8}, Annotations={9}, ProfileName = {10}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool CustomTrackingRecordWarning(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string Name, string ActivityName, string ActivityId, string ActivityInstanceId, string ActivityTypeName, string Data, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 7))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 7, eventTraceActivity, InstanceId, RecordNumber, EventTime, Name, ActivityName, ActivityId, ActivityInstanceId, ActivityTypeName, Data, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=102, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceAbortedRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 8);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}
        /// Event description ID=102, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="Reason">Parameter 4 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="Annotations">Parameter 5 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="ProfileName">Parameter 6 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceAbortedRecord(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string Reason, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 8))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 8, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, Reason, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=100, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 9);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}
        /// Event description ID=100, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="State">Parameter 4 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="Annotations">Parameter 5 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="ProfileName">Parameter 6 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceRecord(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string State, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 9))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 9, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, State, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=101, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceUnhandledExceptionRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 10);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}
        /// Event description ID=101, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="SourceName">Parameter 4 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="SourceId">Parameter 5 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="SourceInstanceId">Parameter 6 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="SourceTypeName">Parameter 7 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="Exception">Parameter 8 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="Annotations">Parameter 9 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="ProfileName">Parameter 10 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8}, Annotations= {9}, ProfileName = {10}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceUnhandledExceptionRecord(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string SourceName, string SourceId, string SourceInstanceId, string SourceTypeName, string Exception, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 10))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 10, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, SourceName, SourceId, SourceInstanceId, SourceTypeName, Exception, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=112, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceSuspendedRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 11);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}
        /// Event description ID=112, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="Reason">Parameter 4 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="Annotations">Parameter 5 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="ProfileName">Parameter 6 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceSuspendedRecord(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string Reason, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 11))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 11, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, Reason, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=113, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceTerminatedRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 12);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}
        /// Event description ID=113, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="Reason">Parameter 4 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="Annotations">Parameter 5 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="ProfileName">Parameter 6 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceTerminatedRecord(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string Reason, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 12))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 12, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, Reason, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=114, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceRecordWithIdIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 13);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}
        /// Event description ID=114, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="State">Parameter 4 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="Annotations">Parameter 5 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="ProfileName">Parameter 6 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="WorkflowDefinitionIdentity">Parameter 7 for event: TrackRecord= WorkflowInstanceRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceRecordWithId(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string State, string Annotations, string ProfileName, string WorkflowDefinitionIdentity, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 13))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 13, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, State, Annotations, ProfileName, WorkflowDefinitionIdentity, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=115, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceAbortedRecordWithIdIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 14);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}
        /// Event description ID=115, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="Reason">Parameter 4 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="Annotations">Parameter 5 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="ProfileName">Parameter 6 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="WorkflowDefinitionIdentity">Parameter 7 for event: TrackRecord = WorkflowInstanceAbortedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceAbortedRecordWithId(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string Reason, string Annotations, string ProfileName, string WorkflowDefinitionIdentity, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 14))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 14, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, Reason, Annotations, ProfileName, WorkflowDefinitionIdentity, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=116, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceSuspendedRecordWithIdIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 15);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}
        /// Event description ID=116, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="Reason">Parameter 4 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="Annotations">Parameter 5 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="ProfileName">Parameter 6 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="WorkflowDefinitionIdentity">Parameter 7 for event: TrackRecord = WorkflowInstanceSuspendedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4}, Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceSuspendedRecordWithId(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string Reason, string Annotations, string ProfileName, string WorkflowDefinitionIdentity, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 15))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 15, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, Reason, Annotations, ProfileName, WorkflowDefinitionIdentity, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=117, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceTerminatedRecordWithIdIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 16);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}
        /// Event description ID=117, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="Reason">Parameter 4 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="Annotations">Parameter 5 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="ProfileName">Parameter 6 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="WorkflowDefinitionIdentity">Parameter 7 for event: TrackRecord = WorkflowInstanceTerminatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, Reason = {4},  Annotations = {5}, ProfileName = {6}, WorkflowDefinitionIdentity = {7}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceTerminatedRecordWithId(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string Reason, string Annotations, string ProfileName, string WorkflowDefinitionIdentity, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 16))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 16, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, Reason, Annotations, ProfileName, WorkflowDefinitionIdentity, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=118, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceUnhandledExceptionRecordWithIdIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 17);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}
        /// Event description ID=118, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="SourceName">Parameter 4 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="SourceId">Parameter 5 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="SourceInstanceId">Parameter 6 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="SourceTypeName">Parameter 7 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="Exception">Parameter 8 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="Annotations">Parameter 9 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="ProfileName">Parameter 10 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="WorkflowDefinitionIdentity">Parameter 11 for event: TrackRecord = WorkflowInstanceUnhandledExceptionRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, SourceName = {4}, SourceId = {5}, SourceInstanceId = {6}, SourceTypeName={7}, Exception={8},  Annotations= {9}, ProfileName = {10}, WorkflowDefinitionIdentity = {11}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceUnhandledExceptionRecordWithId(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string SourceName, string SourceId, string SourceInstanceId, string SourceTypeName, string Exception, string Annotations, string ProfileName, string WorkflowDefinitionIdentity, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 17))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 17, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, SourceName, SourceId, SourceInstanceId, SourceTypeName, Exception, Annotations, ProfileName, WorkflowDefinitionIdentity, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Check if trace definition is enabled
        /// Event description ID=119, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        internal static bool WorkflowInstanceUpdatedRecordIsEnabled(EtwDiagnosticTrace trace)
        {
            return EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 18);
        }
        
        /// <summary>
        /// Gets trace definition like: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}
        /// Event description ID=119, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="InstanceId">Parameter 0 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="RecordNumber">Parameter 1 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="EventTime">Parameter 2 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="ActivityDefinitionId">Parameter 3 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="State">Parameter 4 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="OriginalDefinitionIdentity">Parameter 5 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="UpdatedDefinitionIdentity">Parameter 6 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="Annotations">Parameter 7 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="ProfileName">Parameter 8 for event: TrackRecord= WorkflowInstanceUpdatedRecord, InstanceID = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, State = {4}, OriginalDefinitionIdentity = {5}, UpdatedDefinitionIdentity = {6}, Annotations = {7}, ProfileName = {8}</param>
        /// <param name="reference">Reference (e.g. service reference) to be added to trace</param>
        internal static bool WorkflowInstanceUpdatedRecord(EtwDiagnosticTrace trace, System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, System.Guid InstanceId, long RecordNumber, long EventTime, string ActivityDefinitionId, string State, string OriginalDefinitionIdentity, string UpdatedDefinitionIdentity, string Annotations, string ProfileName, string reference)
        {
            bool etwTraceResult = true;
            TracePayload payload = trace.GetSerializedPayload(null, null, null);
            if (EtwTrackingParticipantTrackRecords.IsEtwEventEnabled(trace, 18))
            {
                etwTraceResult = EtwTrackingParticipantTrackRecords.WriteEtwEvent(trace, 18, eventTraceActivity, InstanceId, RecordNumber, EventTime, ActivityDefinitionId, State, OriginalDefinitionIdentity, UpdatedDefinitionIdentity, Annotations, ProfileName, reference, payload.AppDomainFriendlyName);
            }
            return etwTraceResult;
        }
        
        /// <summary>
        /// Creates the event descriptors array
        /// </summary>
        // Critical = Sets the SecurityCritical member eventDescriptors
        // Safe = We control what the event descriptors contain
        [System.Security.SecuritySafeCriticalAttribute()]
        static void CreateEventDescriptors()
        {
            eventDescriptors = new System.Runtime.Diagnostics.EventDescriptor[] {
                    new System.Runtime.Diagnostics.EventDescriptor(104, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa31, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(103, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa31, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(107, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa31, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(106, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa31, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(105, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Warning, (byte)TraceEventOpcode.Info, 0xa31, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(108, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0x9df, 0x20000000001E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(111, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Error, (byte)TraceEventOpcode.Info, 0x9df, 0x20000000001E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(110, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Warning, (byte)TraceEventOpcode.Info, 0x9df, 0x20000000001E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(102, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Warning, (byte)144, 0xa30, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(100, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa30, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(101, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Error, (byte)150, 0xa30, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(112, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)146, 0xa30, 0x2000000000040040),
                    new System.Runtime.Diagnostics.EventDescriptor(113, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Error, (byte)148, 0xa30, 0x20000000000E0040),
                    new System.Runtime.Diagnostics.EventDescriptor(114, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)TraceEventOpcode.Info, 0xa30, 0x2000000000040040),
                    new System.Runtime.Diagnostics.EventDescriptor(115, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Warning, (byte)145, 0xa30, 0x2000000000040040),
                    new System.Runtime.Diagnostics.EventDescriptor(116, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)147, 0xa30, 0x2000000000040040),
                    new System.Runtime.Diagnostics.EventDescriptor(117, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Error, (byte)149, 0xa30, 0x2000000000040040),
                    new System.Runtime.Diagnostics.EventDescriptor(118, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Error, (byte)151, 0xa30, 0x2000000000040040),
                    new System.Runtime.Diagnostics.EventDescriptor(119, 0, (byte)TraceChannel.Analytic, (byte)TraceEventLevel.Informational, (byte)152, 0xa30, 0x2000000000040040)};
        }
        
        /// <summary>
        /// Ensures that the event descriptors array is initialized
        /// </summary>
        static void EnsureEventDescriptors()
        {
            if (eventDescriptorsCreated)
            {
                return;
            }
            System.Threading.Monitor.Enter(syncLock);
            try
            {
                if (eventDescriptorsCreated)
                {
                    return;
                }
                CreateEventDescriptors();
                eventDescriptorsCreated = true;
            }
            finally
            {
                System.Threading.Monitor.Exit(syncLock);
            }
        }
        
        /// <summary>
        /// Check if ETW tracing is enabled for the particular event
        /// </summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>
        // Critical = Accesses SecurityCritical member eventDescriptors
        // Safe = eventDescriptors is not changed
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool IsEtwEventEnabled(EtwDiagnosticTrace trace, int eventIndex)
        {
            if (trace.IsEtwProviderEnabled)
            {
                EnsureEventDescriptors();
                return trace.IsEtwEventEnabled(ref eventDescriptors[eventIndex], false);
            }
            return false;
        }
        
        /// <summary>
        /// Writes ETW trace event
        ///</summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>>
        /// <param name="eventParam0">A parameter of the ETW event</param>>
        /// <param name="eventParam1">A parameter of the ETW event</param>>
        /// <param name="eventParam2">A parameter of the ETW event</param>>
        /// <param name="eventParam3">A parameter of the ETW event</param>>
        /// <param name="eventParam4">A parameter of the ETW event</param>>
        /// <param name="eventParam5">A parameter of the ETW event</param>>
        /// <param name="eventParam6">A parameter of the ETW event</param>>
        /// <param name="eventParam7">A parameter of the ETW event</param>>
        /// <param name="eventParam8">A parameter of the ETW event</param>>
        /// <param name="eventParam9">A parameter of the ETW event</param>>
        /// <param name="eventParam10">A parameter of the ETW event</param>>
        /// <param name="eventParam11">A parameter of the ETW event</param>>
        /// <param name="eventParam12">A parameter of the ETW event</param>>
        /// <param name="eventParam13">A parameter of the ETW event</param>>
        /// <param name="eventParam14">A parameter of the ETW event</param>>
        /// <param name="eventParam15">A parameter of the ETW event</param>>
        // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
        // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool WriteEtwEvent(
                    EtwDiagnosticTrace trace, 
                    int eventIndex, 
                    System.Runtime.Diagnostics.EventTraceActivity eventParam0, 
                    System.Guid eventParam1, 
                    long eventParam2, 
                    long eventParam3, 
                    string eventParam4, 
                    string eventParam5, 
                    string eventParam6, 
                    string eventParam7, 
                    string eventParam8, 
                    string eventParam9, 
                    string eventParam10, 
                    string eventParam11, 
                    string eventParam12, 
                    string eventParam13, 
                    string eventParam14, 
                    string eventParam15)
        {
            EnsureEventDescriptors();
            return trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3, eventParam4, eventParam5, eventParam6, eventParam7, eventParam8, eventParam9, eventParam10, eventParam11, eventParam12, eventParam13, eventParam14, eventParam15);
        }
        
        /// <summary>
        /// Writes ETW trace event
        ///</summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>>
        /// <param name="eventParam0">A parameter of the ETW event</param>>
        /// <param name="eventParam1">A parameter of the ETW event</param>>
        /// <param name="eventParam2">A parameter of the ETW event</param>>
        /// <param name="eventParam3">A parameter of the ETW event</param>>
        /// <param name="eventParam4">A parameter of the ETW event</param>>
        /// <param name="eventParam5">A parameter of the ETW event</param>>
        /// <param name="eventParam6">A parameter of the ETW event</param>>
        /// <param name="eventParam7">A parameter of the ETW event</param>>
        /// <param name="eventParam8">A parameter of the ETW event</param>>
        /// <param name="eventParam9">A parameter of the ETW event</param>>
        /// <param name="eventParam10">A parameter of the ETW event</param>>
        /// <param name="eventParam11">A parameter of the ETW event</param>>
        /// <param name="eventParam12">A parameter of the ETW event</param>>
        /// <param name="eventParam13">A parameter of the ETW event</param>>
        /// <param name="eventParam14">A parameter of the ETW event</param>>
        // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
        // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool WriteEtwEvent(
                    EtwDiagnosticTrace trace, 
                    int eventIndex, 
                    System.Runtime.Diagnostics.EventTraceActivity eventParam0, 
                    System.Guid eventParam1, 
                    long eventParam2, 
                    long eventParam3, 
                    string eventParam4, 
                    string eventParam5, 
                    string eventParam6, 
                    string eventParam7, 
                    string eventParam8, 
                    string eventParam9, 
                    string eventParam10, 
                    string eventParam11, 
                    string eventParam12, 
                    string eventParam13, 
                    string eventParam14)
        {
            EnsureEventDescriptors();
            return trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3, eventParam4, eventParam5, eventParam6, eventParam7, eventParam8, eventParam9, eventParam10, eventParam11, eventParam12, eventParam13, eventParam14);
        }
        
        /// <summary>
        /// Writes ETW trace event
        ///</summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>>
        /// <param name="eventParam0">A parameter of the ETW event</param>>
        /// <param name="eventParam1">A parameter of the ETW event</param>>
        /// <param name="eventParam2">A parameter of the ETW event</param>>
        /// <param name="eventParam3">A parameter of the ETW event</param>>
        /// <param name="eventParam4">A parameter of the ETW event</param>>
        /// <param name="eventParam5">A parameter of the ETW event</param>>
        /// <param name="eventParam6">A parameter of the ETW event</param>>
        /// <param name="eventParam7">A parameter of the ETW event</param>>
        /// <param name="eventParam8">A parameter of the ETW event</param>>
        /// <param name="eventParam9">A parameter of the ETW event</param>>
        /// <param name="eventParam10">A parameter of the ETW event</param>>
        /// <param name="eventParam11">A parameter of the ETW event</param>>
        /// <param name="eventParam12">A parameter of the ETW event</param>>
        /// <param name="eventParam13">A parameter of the ETW event</param>>
        // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
        // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool WriteEtwEvent(
                    EtwDiagnosticTrace trace, 
                    int eventIndex, 
                    System.Runtime.Diagnostics.EventTraceActivity eventParam0, 
                    System.Guid eventParam1, 
                    long eventParam2, 
                    long eventParam3, 
                    string eventParam4, 
                    System.Guid eventParam5, 
                    string eventParam6, 
                    string eventParam7, 
                    string eventParam8, 
                    string eventParam9, 
                    string eventParam10, 
                    string eventParam11, 
                    string eventParam12, 
                    string eventParam13)
        {
            EnsureEventDescriptors();
            return trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3, eventParam4, eventParam5, eventParam6, eventParam7, eventParam8, eventParam9, eventParam10, eventParam11, eventParam12, eventParam13);
        }
        
        /// <summary>
        /// Writes ETW trace event
        ///</summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>>
        /// <param name="eventParam0">A parameter of the ETW event</param>>
        /// <param name="eventParam1">A parameter of the ETW event</param>>
        /// <param name="eventParam2">A parameter of the ETW event</param>>
        /// <param name="eventParam3">A parameter of the ETW event</param>>
        /// <param name="eventParam4">A parameter of the ETW event</param>>
        /// <param name="eventParam5">A parameter of the ETW event</param>>
        /// <param name="eventParam6">A parameter of the ETW event</param>>
        /// <param name="eventParam7">A parameter of the ETW event</param>>
        /// <param name="eventParam8">A parameter of the ETW event</param>>
        /// <param name="eventParam9">A parameter of the ETW event</param>>
        /// <param name="eventParam10">A parameter of the ETW event</param>>
        /// <param name="eventParam11">A parameter of the ETW event</param>>
        /// <param name="eventParam12">A parameter of the ETW event</param>>
        /// <param name="eventParam13">A parameter of the ETW event</param>>
        /// <param name="eventParam14">A parameter of the ETW event</param>>
        /// <param name="eventParam15">A parameter of the ETW event</param>>
        /// <param name="eventParam16">A parameter of the ETW event</param>>
        /// <param name="eventParam17">A parameter of the ETW event</param>>
        // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
        // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool WriteEtwEvent(
                    EtwDiagnosticTrace trace, 
                    int eventIndex, 
                    System.Runtime.Diagnostics.EventTraceActivity eventParam0, 
                    System.Guid eventParam1, 
                    long eventParam2, 
                    long eventParam3, 
                    string eventParam4, 
                    string eventParam5, 
                    string eventParam6, 
                    string eventParam7, 
                    string eventParam8, 
                    string eventParam9, 
                    string eventParam10, 
                    string eventParam11, 
                    string eventParam12, 
                    bool eventParam13, 
                    string eventParam14, 
                    string eventParam15, 
                    string eventParam16, 
                    string eventParam17)
        {
            EnsureEventDescriptors();
            return trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3, eventParam4, eventParam5, eventParam6, eventParam7, eventParam8, eventParam9, eventParam10, eventParam11, eventParam12, eventParam13, eventParam14, eventParam15, eventParam16, eventParam17);
        }
        
        /// <summary>
        /// Writes ETW trace event
        ///</summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>>
        /// <param name="eventParam0">A parameter of the ETW event</param>>
        /// <param name="eventParam1">A parameter of the ETW event</param>>
        /// <param name="eventParam2">A parameter of the ETW event</param>>
        /// <param name="eventParam3">A parameter of the ETW event</param>>
        /// <param name="eventParam4">A parameter of the ETW event</param>>
        /// <param name="eventParam5">A parameter of the ETW event</param>>
        /// <param name="eventParam6">A parameter of the ETW event</param>>
        /// <param name="eventParam7">A parameter of the ETW event</param>>
        /// <param name="eventParam8">A parameter of the ETW event</param>>
        /// <param name="eventParam9">A parameter of the ETW event</param>>
        /// <param name="eventParam10">A parameter of the ETW event</param>>
        /// <param name="eventParam11">A parameter of the ETW event</param>>
        /// <param name="eventParam12">A parameter of the ETW event</param>>
        /// <param name="eventParam13">A parameter of the ETW event</param>>
        // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
        // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool WriteEtwEvent(
                    EtwDiagnosticTrace trace, 
                    int eventIndex, 
                    System.Runtime.Diagnostics.EventTraceActivity eventParam0, 
                    System.Guid eventParam1, 
                    long eventParam2, 
                    long eventParam3, 
                    string eventParam4, 
                    string eventParam5, 
                    string eventParam6, 
                    string eventParam7, 
                    string eventParam8, 
                    string eventParam9, 
                    string eventParam10, 
                    string eventParam11, 
                    string eventParam12, 
                    string eventParam13)
        {
            EnsureEventDescriptors();
            return trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3, eventParam4, eventParam5, eventParam6, eventParam7, eventParam8, eventParam9, eventParam10, eventParam11, eventParam12, eventParam13);
        }
        
        /// <summary>
        /// Writes ETW trace event
        ///</summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>>
        /// <param name="eventParam0">A parameter of the ETW event</param>>
        /// <param name="eventParam1">A parameter of the ETW event</param>>
        /// <param name="eventParam2">A parameter of the ETW event</param>>
        /// <param name="eventParam3">A parameter of the ETW event</param>>
        /// <param name="eventParam4">A parameter of the ETW event</param>>
        /// <param name="eventParam5">A parameter of the ETW event</param>>
        /// <param name="eventParam6">A parameter of the ETW event</param>>
        /// <param name="eventParam7">A parameter of the ETW event</param>>
        /// <param name="eventParam8">A parameter of the ETW event</param>>
        /// <param name="eventParam9">A parameter of the ETW event</param>>
        // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
        // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool WriteEtwEvent(EtwDiagnosticTrace trace, int eventIndex, System.Runtime.Diagnostics.EventTraceActivity eventParam0, System.Guid eventParam1, long eventParam2, long eventParam3, string eventParam4, string eventParam5, string eventParam6, string eventParam7, string eventParam8, string eventParam9)
        {
            EnsureEventDescriptors();
            return trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3, eventParam4, eventParam5, eventParam6, eventParam7, eventParam8, eventParam9);
        }
        
        /// <summary>
        /// Writes ETW trace event
        ///</summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>>
        /// <param name="eventParam0">A parameter of the ETW event</param>>
        /// <param name="eventParam1">A parameter of the ETW event</param>>
        /// <param name="eventParam2">A parameter of the ETW event</param>>
        /// <param name="eventParam3">A parameter of the ETW event</param>>
        /// <param name="eventParam4">A parameter of the ETW event</param>>
        /// <param name="eventParam5">A parameter of the ETW event</param>>
        /// <param name="eventParam6">A parameter of the ETW event</param>>
        /// <param name="eventParam7">A parameter of the ETW event</param>>
        /// <param name="eventParam8">A parameter of the ETW event</param>>
        /// <param name="eventParam9">A parameter of the ETW event</param>>
        /// <param name="eventParam10">A parameter of the ETW event</param>>
        // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
        // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool WriteEtwEvent(EtwDiagnosticTrace trace, int eventIndex, System.Runtime.Diagnostics.EventTraceActivity eventParam0, System.Guid eventParam1, long eventParam2, long eventParam3, string eventParam4, string eventParam5, string eventParam6, string eventParam7, string eventParam8, string eventParam9, string eventParam10)
        {
            EnsureEventDescriptors();
            return trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3, eventParam4, eventParam5, eventParam6, eventParam7, eventParam8, eventParam9, eventParam10);
        }
        
        /// <summary>
        /// Writes ETW trace event
        ///</summary>
        /// <param name="trace">The trace provider</param>
        /// <param name="eventIndex">The index of the event descriptor</param>>
        /// <param name="eventParam0">A parameter of the ETW event</param>>
        /// <param name="eventParam1">A parameter of the ETW event</param>>
        /// <param name="eventParam2">A parameter of the ETW event</param>>
        /// <param name="eventParam3">A parameter of the ETW event</param>>
        /// <param name="eventParam4">A parameter of the ETW event</param>>
        /// <param name="eventParam5">A parameter of the ETW event</param>>
        /// <param name="eventParam6">A parameter of the ETW event</param>>
        /// <param name="eventParam7">A parameter of the ETW event</param>>
        /// <param name="eventParam8">A parameter of the ETW event</param>>
        /// <param name="eventParam9">A parameter of the ETW event</param>>
        /// <param name="eventParam10">A parameter of the ETW event</param>>
        /// <param name="eventParam11">A parameter of the ETW event</param>>
        // Critical = Calls SecurityCritical method EtwProvider.WriteEvent
        // Safe = We only allow setting of provider id from SecurityCritical code, access to EventDescriptors is SecurityCritical, and ETW limits buffer sizes.
        [System.Security.SecuritySafeCriticalAttribute()]
        static bool WriteEtwEvent(EtwDiagnosticTrace trace, int eventIndex, System.Runtime.Diagnostics.EventTraceActivity eventParam0, System.Guid eventParam1, long eventParam2, long eventParam3, string eventParam4, string eventParam5, string eventParam6, string eventParam7, string eventParam8, string eventParam9, string eventParam10, string eventParam11)
        {
            EnsureEventDescriptors();
            return trace.EtwProvider.WriteEvent(ref eventDescriptors[eventIndex], eventParam0, eventParam1, eventParam2, eventParam3, eventParam4, eventParam5, eventParam6, eventParam7, eventParam8, eventParam9, eventParam10, eventParam11);
        }
    }
}

