Mark applicable structs as readonly and use in-modifier (#13919)

This commit is contained in:
xtqqczze
2020-12-09 11:36:48 -08:00
committed by GitHub
parent 817e6b044b
commit 41ab20cce3
26 changed files with 135 additions and 135 deletions
@@ -327,11 +327,11 @@ namespace Microsoft.PowerShell.Commands
}
}
provider.WriteEvent(ref ed, _payload);
provider.WriteEvent(in ed, _payload);
}
else
{
provider.WriteEvent(ref ed);
provider.WriteEvent(in ed);
}
}
@@ -336,7 +336,7 @@ namespace Microsoft.PowerShell.Commands
/// A struct to hold the path information and the content readers/writers
/// for an item.
/// </summary>
internal struct ContentHolder
internal readonly struct ContentHolder
{
internal ContentHolder(
PathInfo pathInfo,
@@ -277,7 +277,7 @@ namespace Microsoft.PowerShell.Commands
/// true if no error occured
/// false if there was an error
/// </returns>
private bool ScanForwardsForTail(ContentHolder holder, CmdletProviderContext currentContext)
private bool ScanForwardsForTail(in ContentHolder holder, CmdletProviderContext currentContext)
{
var fsReader = holder.Reader as FileSystemContentReaderWriter;
Dbg.Diagnostics.Assert(fsReader != null, "Tail is only supported for FileSystemContentReaderWriter");
@@ -18,7 +18,7 @@ namespace Microsoft.PowerShell
/// string fields at all, nothing is lost.
/// </remarks>
[StructLayout(LayoutKind.Sequential)]
internal struct StartUpInfo
internal readonly struct StartUpInfo
{
public readonly UInt32 cb;
private readonly IntPtr lpReserved;
@@ -141,7 +141,7 @@ namespace Microsoft.PowerShell
/// <param name="pv"></param>
/// <returns></returns>
[PreserveSig]
HResult GetValue([In] ref PropertyKey key, [Out] PropVariant pv);
HResult GetValue([In] in PropertyKey key, [Out] PropVariant pv);
/// <summary>
/// Sets the value of a property in the store.
@@ -150,7 +150,7 @@ namespace Microsoft.PowerShell
/// <param name="pv"></param>
/// <returns></returns>
[PreserveSig]
HResult SetValue([In] ref PropertyKey key, [In] PropVariant pv);
HResult SetValue([In] in PropertyKey key, [In] PropVariant pv);
/// <summary>
/// Commits the changes.
@@ -10,7 +10,7 @@ namespace Microsoft.PowerShell
/// Defines a unique key for a Shell Property.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 4)]
internal struct PropertyKey : IEquatable<PropertyKey>
internal readonly struct PropertyKey : IEquatable<PropertyKey>
{
#region Public Properties
/// <summary>
@@ -97,7 +97,7 @@ namespace Microsoft.PowerShell
flags |= 0x00002000; // SLDF_RUNAS_USER
shellLinkDataList.SetFlags(flags);
var PKEY_TITLE = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 2);
hResult = nativePropertyStore.SetValue(ref PKEY_TITLE, new PropVariant(title));
hResult = nativePropertyStore.SetValue(in PKEY_TITLE, new PropVariant(title));
if (hResult < 0)
{
pCustDestList.AbortList();
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
namespace System.Diagnostics.Eventing
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
public struct EventDescriptor
public readonly struct EventDescriptor
{
[FieldOffset(0)]
private readonly ushort _id;
@@ -488,9 +488,9 @@ namespace System.Diagnostics.Eventing
/// </param>
/// <param name="eventPayload">
/// </param>
public bool WriteEvent(ref EventDescriptor eventDescriptor, params object[] eventPayload)
public bool WriteEvent(in EventDescriptor eventDescriptor, params object[] eventPayload)
{
return WriteTransferEvent(ref eventDescriptor, Guid.Empty, eventPayload);
return WriteTransferEvent(in eventDescriptor, Guid.Empty, eventPayload);
}
/// <summary>
@@ -504,7 +504,7 @@ namespace System.Diagnostics.Eventing
/// </param>
[System.Security.SecurityCritical]
[SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly")]
public bool WriteEvent(ref EventDescriptor eventDescriptor, string data)
public bool WriteEvent(in EventDescriptor eventDescriptor, string data)
{
uint status = 0;
@@ -534,7 +534,7 @@ namespace System.Diagnostics.Eventing
userData.DataPointer = (ulong)pdata;
status = UnsafeNativeMethods.EventWriteTransfer(_regHandle,
ref eventDescriptor,
in eventDescriptor,
(activityId == Guid.Empty) ? null : &activityId,
null,
1,
@@ -565,7 +565,7 @@ namespace System.Diagnostics.Eventing
/// pointer do the event data
/// </param>
[System.Security.SecurityCritical]
protected bool WriteEvent(ref EventDescriptor eventDescriptor, int dataCount, IntPtr data)
protected bool WriteEvent(in EventDescriptor eventDescriptor, int dataCount, IntPtr data)
{
uint status = 0;
@@ -575,7 +575,7 @@ namespace System.Diagnostics.Eventing
status = UnsafeNativeMethods.EventWriteTransfer(
_regHandle,
ref eventDescriptor,
in eventDescriptor,
(activityId == Guid.Empty) ? null : &activityId,
null,
(uint)dataCount,
@@ -602,7 +602,7 @@ namespace System.Diagnostics.Eventing
/// <param name="eventPayload">
/// </param>
[System.Security.SecurityCritical]
public bool WriteTransferEvent(ref EventDescriptor eventDescriptor, Guid relatedActivityId, params object[] eventPayload)
public bool WriteTransferEvent(in EventDescriptor eventDescriptor, Guid relatedActivityId, params object[] eventPayload)
{
uint status = 0;
@@ -719,7 +719,7 @@ namespace System.Diagnostics.Eventing
}
status = UnsafeNativeMethods.EventWriteTransfer(_regHandle,
ref eventDescriptor,
in eventDescriptor,
(activityId == Guid.Empty) ? null : &activityId,
(relatedActivityId == Guid.Empty) ? null : &relatedActivityId,
(uint)argCount,
@@ -737,7 +737,7 @@ namespace System.Diagnostics.Eventing
}
[System.Security.SecurityCritical]
protected bool WriteTransferEvent(ref EventDescriptor eventDescriptor, Guid relatedActivityId, int dataCount, IntPtr data)
protected bool WriteTransferEvent(in EventDescriptor eventDescriptor, Guid relatedActivityId, int dataCount, IntPtr data)
{
uint status = 0;
@@ -747,7 +747,7 @@ namespace System.Diagnostics.Eventing
{
status = UnsafeNativeMethods.EventWriteTransfer(
_regHandle,
ref eventDescriptor,
in eventDescriptor,
(activityId == Guid.Empty) ? null : &activityId,
&relatedActivityId,
(uint)dataCount,
@@ -132,7 +132,7 @@ namespace System.Diagnostics.Eventing
// Control (Is Enabled) APIs
[DllImport(EventProviderDllName, ExactSpelling = true, EntryPoint = "EventEnabled", CharSet = System.Runtime.InteropServices.CharSet.Unicode)]
[SecurityCritical]
internal static extern int EventEnabled([In] long registrationHandle, [In] ref System.Diagnostics.Eventing.EventDescriptor eventDescriptor);
internal static extern int EventEnabled([In] long registrationHandle, [In] in System.Diagnostics.Eventing.EventDescriptor eventDescriptor);
[DllImport(EventProviderDllName, ExactSpelling = true, EntryPoint = "EventProviderEnabled", CharSet = System.Runtime.InteropServices.CharSet.Unicode)]
[SecurityCritical]
@@ -143,7 +143,7 @@ namespace System.Diagnostics.Eventing
[SecurityCritical]
internal static extern unsafe uint EventWrite(
[In] long registrationHandle,
[In] ref EventDescriptor eventDescriptor,
[In] in EventDescriptor eventDescriptor,
[In] uint userDataCount,
[In] void* userData
);
@@ -162,7 +162,7 @@ namespace System.Diagnostics.Eventing
[SecurityCritical]
internal static extern unsafe uint EventWriteTransfer(
[In] long registrationHandle,
[In] ref EventDescriptor eventDescriptor,
[In] in EventDescriptor eventDescriptor,
[In] Guid* activityId,
[In] Guid* relatedActivityId,
[In] uint userDataCount,
@@ -123,7 +123,7 @@ namespace Microsoft.PowerShell.Commands
/// The structure contains punycode name and unicode name.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
public struct DnsNameRepresentation
public readonly struct DnsNameRepresentation
{
/// <summary>
/// Punycode version of DNS name.
@@ -3064,7 +3064,7 @@ namespace Microsoft.PowerShell.Commands
/// The structure contains friendly name and EKU oid.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
public struct EnhancedKeyUsageRepresentation
public readonly struct EnhancedKeyUsageRepresentation
{
/// <summary>
/// Localized friendly name of EKU.
@@ -740,7 +740,7 @@ namespace System.Management.Automation
return false;
}
private struct CommandAndName
private readonly struct CommandAndName
{
internal readonly PSObject Command;
internal readonly PSSnapinQualifiedName CommandName;
@@ -1067,7 +1067,7 @@ namespace System.Management.Automation
return isAbsolute;
}
private struct PathItemAndConvertedPath
private readonly struct PathItemAndConvertedPath
{
internal readonly string Path;
internal readonly PSObject Item;
@@ -904,7 +904,7 @@ namespace System.Management.Automation
}
[DebuggerDisplay("{PSTypeName} {Name}")]
internal struct PSMemberNameAndType
internal readonly struct PSMemberNameAndType
{
public readonly string Name;
@@ -960,7 +960,7 @@ namespace System.Management.Automation
}
}
private static bool IsPSTypeName(PSMemberNameAndType member) => member.Name.Equals(nameof(PSTypeName), StringComparison.OrdinalIgnoreCase);
private static bool IsPSTypeName(in PSMemberNameAndType member) => member.Name.Equals(nameof(PSTypeName), StringComparison.OrdinalIgnoreCase);
private static string GetMemberTypeProjection(string typename, IList<PSMemberNameAndType> members)
{
@@ -5104,7 +5104,7 @@ namespace System.Management.Automation
return null;
}
private struct SignatureComparator
private readonly struct SignatureComparator
{
private enum TypeMatchingContext
{
@@ -68,7 +68,7 @@ namespace System.Management.Automation
/// Type used to define a parameter on a cmdlet script of function that
/// can only be used as a switch.
/// </summary>
public struct SwitchParameter
public readonly struct SwitchParameter
{
private readonly bool _isPresent;
/// <summary>
@@ -19,7 +19,7 @@ using System.Globalization;
namespace System.Management.Automation.Interpreter
{
internal struct RuntimeLabel
internal readonly struct RuntimeLabel
{
public readonly int Index;
public readonly int StackDepth;
@@ -24,7 +24,7 @@ namespace System.Management.Automation.Interpreter
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
[DebuggerTypeProxy(typeof(InstructionArray.DebugView))]
internal struct InstructionArray
internal readonly struct InstructionArray
{
internal readonly int MaxStackDepth;
internal readonly int MaxContinuationDepth;
@@ -156,7 +156,7 @@ namespace System.Management.Automation.Interpreter
}
[DebuggerDisplay("{GetValue(),nq}", Name = "{GetName(),nq}", Type = "{GetDisplayType(), nq}")]
internal struct InstructionView
internal readonly struct InstructionView
{
private readonly int _index;
private readonly int _stackDepth;
@@ -243,7 +243,7 @@ namespace System.Management.Automation.Interpreter
// TODO:
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
[Serializable]
internal struct InterpretedFrameInfo
internal readonly struct InterpretedFrameInfo
{
public readonly string MethodName;
@@ -78,7 +78,7 @@ namespace System.Management.Automation.Interpreter
}
}
internal struct LocalDefinition
internal readonly struct LocalDefinition
{
private readonly int _index;
private readonly ParameterExpression _parameter;
@@ -668,7 +668,7 @@ namespace System.Management.Automation.Interpreter
}
}
private struct KeyInfo
private readonly struct KeyInfo
{
internal readonly TValue Value;
internal readonly LinkedListNode<TKey> List;
@@ -1264,7 +1264,7 @@ namespace System.Management.Automation
}
}
private struct CharacterNormalizer
private readonly struct CharacterNormalizer
{
private readonly CultureInfo _cultureInfo;
private readonly bool _caseInsensitive;
@@ -1955,18 +1955,18 @@ namespace System.Management.Automation.Security
}
[StructLayout(LayoutKind.Sequential)]
internal struct CRYPTCATCDF
internal readonly struct CRYPTCATCDF
{
private DWORD _cbStruct;
private IntPtr _hFile;
private DWORD _dwCurFilePos;
private DWORD _dwLastMemberOffset;
private BOOL _fEOF;
private readonly DWORD _cbStruct;
private readonly IntPtr _hFile;
private readonly DWORD _dwCurFilePos;
private readonly DWORD _dwLastMemberOffset;
private readonly BOOL _fEOF;
[MarshalAs(UnmanagedType.LPWStr)]
private string _pwszResultDir;
private readonly string _pwszResultDir;
private IntPtr _hCATStore;
private readonly IntPtr _hCATStore;
}
[StructLayout(LayoutKind.Sequential)]
@@ -866,7 +866,7 @@ namespace System.Management.Automation.Tracing
}
}
return _provider.WriteEvent(ref ed, args);
return _provider.WriteEvent(in ed, args);
}
/// <summary>
@@ -255,7 +255,7 @@ namespace System.Management.Automation.Tracing
private static readonly Dictionary<Guid, EventProvider> providers = new Dictionary<Guid, EventProvider>();
private static readonly object syncLock = new object();
private static EventDescriptor _WriteTransferEvent = new EventDescriptor(0x1f05, 0x1, 0x11, 0x5, 0x14, 0x0, (long)0x4000000000000000);
private static readonly EventDescriptor _WriteTransferEvent = new EventDescriptor(0x1f05, 0x1, 0x11, 0x5, 0x14, 0x0, (long)0x4000000000000000);
private EventProvider currentProvider;
@@ -328,7 +328,7 @@ namespace System.Management.Automation.Tracing
if (parentActivityId != Guid.Empty)
{
EventDescriptor transferEvent = TransferEvent;
provider.WriteTransferEvent(ref transferEvent, parentActivityId, activityId, parentActivityId);
provider.WriteTransferEvent(in transferEvent, parentActivityId, activityId, parentActivityId);
}
}
@@ -473,7 +473,7 @@ namespace System.Management.Automation.Tracing
}
}
bool success = provider.WriteEvent(ref ed, payload);
bool success = provider.WriteEvent(in ed, payload);
if (EventWritten != null)
{
EventWritten.Invoke(this, new EtwEventArgs(ed, success, payload));
@@ -98,7 +98,7 @@ namespace System.Management.Automation.Tracing
if (relatedActivityId != Guid.Empty)
{
var tempTransferEvent = _transferEvent;
_transferProvider.WriteTransferEvent(ref tempTransferEvent, relatedActivityId);
_transferProvider.WriteTransferEvent(in tempTransferEvent, relatedActivityId);
}
return retActivity;
@@ -284,7 +284,7 @@ namespace System.Management.Automation.Tracing
EventDescriptor desc = new EventDescriptor((int)id, (byte)PSEventVersion.One, (byte)channel,
(byte)level, (byte)opcode, (int)task, longKeyword);
etwProvider.WriteEvent(ref desc, args);
etwProvider.WriteEvent(in desc, args);
}
/// <summary>
@@ -292,7 +292,7 @@ namespace System.Management.Automation.Tracing
/// </summary>
internal void WriteTransferEvent(Guid parentActivityId)
{
etwProvider.WriteTransferEvent(ref _xferEventDescriptor, parentActivityId, EtwActivity.GetActivityId(), parentActivityId);
etwProvider.WriteTransferEvent(in _xferEventDescriptor, parentActivityId, EtwActivity.GetActivityId(), parentActivityId);
}
/// <summary>
@@ -38,88 +38,88 @@ namespace System.Management.Automation.Tracing
public const long KeywordAll = 0xFFFFFFFF;
private static Guid providerId = Guid.Parse("a0c1853b-5c40-4b15-8766-3cf1c58f985a");
private static EventDescriptor WriteTransferEventEvent;
private static EventDescriptor DebugMessageEvent;
private static EventDescriptor M3PAbortingWorkflowExecutionEvent;
private static EventDescriptor M3PActivityExecutionFinishedEvent;
private static EventDescriptor M3PActivityExecutionQueuedEvent;
private static EventDescriptor M3PActivityExecutionStartedEvent;
private static EventDescriptor M3PBeginContainerParentJobExecutionEvent;
private static EventDescriptor M3PBeginCreateNewJobEvent;
private static EventDescriptor M3PBeginJobLogicEvent;
private static EventDescriptor M3PBeginProxyChildJobEventHandlerEvent;
private static EventDescriptor M3PBeginProxyJobEventHandlerEvent;
private static EventDescriptor M3PBeginProxyJobExecutionEvent;
private static EventDescriptor M3PBeginRunGarbageCollectionEvent;
private static EventDescriptor M3PBeginStartWorkflowApplicationEvent;
private static EventDescriptor M3PBeginWorkflowExecutionEvent;
private static EventDescriptor M3PCancellingWorkflowExecutionEvent;
private static EventDescriptor M3PChildWorkflowJobAdditionEvent;
private static EventDescriptor M3PEndContainerParentJobExecutionEvent;
private static EventDescriptor M3PEndCreateNewJobEvent;
private static EventDescriptor M3PEndJobLogicEvent;
private static EventDescriptor M3PEndpointDisabledEvent;
private static EventDescriptor M3PEndpointEnabledEvent;
private static EventDescriptor M3PEndpointModifiedEvent;
private static EventDescriptor M3PEndpointRegisteredEvent;
private static EventDescriptor M3PEndpointUnregisteredEvent;
private static EventDescriptor M3PEndProxyChildJobEventHandlerEvent;
private static EventDescriptor M3PEndProxyJobEventHandlerEvent;
private static EventDescriptor M3PEndProxyJobExecutionEvent;
private static EventDescriptor M3PEndRunGarbageCollectionEvent;
private static EventDescriptor M3PEndStartWorkflowApplicationEvent;
private static EventDescriptor M3PEndWorkflowExecutionEvent;
private static EventDescriptor M3PErrorImportingWorkflowFromXamlEvent;
private static EventDescriptor M3PForcedWorkflowShutdownErrorEvent;
private static EventDescriptor M3PForcedWorkflowShutdownFinishedEvent;
private static EventDescriptor M3PForcedWorkflowShutdownStartedEvent;
private static EventDescriptor M3PImportedWorkflowFromXamlEvent;
private static EventDescriptor M3PImportingWorkflowFromXamlEvent;
private static EventDescriptor M3PJobCreationCompleteEvent;
private static EventDescriptor M3PJobErrorEvent;
private static EventDescriptor M3PJobRemovedEvent;
private static EventDescriptor M3PJobRemoveErrorEvent;
private static EventDescriptor M3PJobStateChangedEvent;
private static EventDescriptor M3PLoadingWorkflowForExecutionEvent;
private static EventDescriptor M3POutOfProcessRunspaceStartedEvent;
private static EventDescriptor M3PParameterSplattingWasPerformedEvent;
private static EventDescriptor M3PParentJobCreatedEvent;
private static EventDescriptor M3PPersistenceStoreMaxSizeReachedEvent;
private static EventDescriptor M3PPersistingWorkflowEvent;
private static EventDescriptor M3PProxyJobRemoteJobAssociationEvent;
private static EventDescriptor M3PRemoveJobStartedEvent;
private static EventDescriptor M3PRunspaceAvailabilityChangedEvent;
private static EventDescriptor M3PRunspaceStateChangedEvent;
private static EventDescriptor M3PTrackingGuidContainerParentJobCorrelationEvent;
private static EventDescriptor M3PUnloadingWorkflowEvent;
private static EventDescriptor M3PWorkflowActivityExecutionFailedEvent;
private static EventDescriptor M3PWorkflowActivityValidatedEvent;
private static EventDescriptor M3PWorkflowActivityValidationFailedEvent;
private static EventDescriptor M3PWorkflowCleanupPerformedEvent;
private static EventDescriptor M3PWorkflowDeletedFromDiskEvent;
private static EventDescriptor M3PWorkflowEngineStartedEvent;
private static EventDescriptor M3PWorkflowExecutionAbortedEvent;
private static EventDescriptor M3PWorkflowExecutionCancelledEvent;
private static EventDescriptor M3PWorkflowExecutionErrorEvent;
private static EventDescriptor M3PWorkflowExecutionFinishedEvent;
private static EventDescriptor M3PWorkflowExecutionStartedEvent;
private static EventDescriptor M3PWorkflowJobCreatedEvent;
private static EventDescriptor M3PWorkflowLoadedForExecutionEvent;
private static EventDescriptor M3PWorkflowLoadedFromDiskEvent;
private static EventDescriptor M3PWorkflowManagerCheckpointEvent;
private static EventDescriptor M3PWorkflowPersistedEvent;
private static EventDescriptor M3PWorkflowPluginRequestedToShutdownEvent;
private static EventDescriptor M3PWorkflowPluginRestartedEvent;
private static EventDescriptor M3PWorkflowPluginStartedEvent;
private static EventDescriptor M3PWorkflowQuotaViolatedEvent;
private static EventDescriptor M3PWorkflowResumedEvent;
private static EventDescriptor M3PWorkflowResumingEvent;
private static EventDescriptor M3PWorkflowRunspacePoolCreatedEvent;
private static EventDescriptor M3PWorkflowStateChangedEvent;
private static EventDescriptor M3PWorkflowUnloadedEvent;
private static EventDescriptor M3PWorkflowValidationErrorEvent;
private static EventDescriptor M3PWorkflowValidationFinishedEvent;
private static EventDescriptor M3PWorkflowValidationStartedEvent;
private static readonly EventDescriptor WriteTransferEventEvent;
private static readonly EventDescriptor DebugMessageEvent;
private static readonly EventDescriptor M3PAbortingWorkflowExecutionEvent;
private static readonly EventDescriptor M3PActivityExecutionFinishedEvent;
private static readonly EventDescriptor M3PActivityExecutionQueuedEvent;
private static readonly EventDescriptor M3PActivityExecutionStartedEvent;
private static readonly EventDescriptor M3PBeginContainerParentJobExecutionEvent;
private static readonly EventDescriptor M3PBeginCreateNewJobEvent;
private static readonly EventDescriptor M3PBeginJobLogicEvent;
private static readonly EventDescriptor M3PBeginProxyChildJobEventHandlerEvent;
private static readonly EventDescriptor M3PBeginProxyJobEventHandlerEvent;
private static readonly EventDescriptor M3PBeginProxyJobExecutionEvent;
private static readonly EventDescriptor M3PBeginRunGarbageCollectionEvent;
private static readonly EventDescriptor M3PBeginStartWorkflowApplicationEvent;
private static readonly EventDescriptor M3PBeginWorkflowExecutionEvent;
private static readonly EventDescriptor M3PCancellingWorkflowExecutionEvent;
private static readonly EventDescriptor M3PChildWorkflowJobAdditionEvent;
private static readonly EventDescriptor M3PEndContainerParentJobExecutionEvent;
private static readonly EventDescriptor M3PEndCreateNewJobEvent;
private static readonly EventDescriptor M3PEndJobLogicEvent;
private static readonly EventDescriptor M3PEndpointDisabledEvent;
private static readonly EventDescriptor M3PEndpointEnabledEvent;
private static readonly EventDescriptor M3PEndpointModifiedEvent;
private static readonly EventDescriptor M3PEndpointRegisteredEvent;
private static readonly EventDescriptor M3PEndpointUnregisteredEvent;
private static readonly EventDescriptor M3PEndProxyChildJobEventHandlerEvent;
private static readonly EventDescriptor M3PEndProxyJobEventHandlerEvent;
private static readonly EventDescriptor M3PEndProxyJobExecutionEvent;
private static readonly EventDescriptor M3PEndRunGarbageCollectionEvent;
private static readonly EventDescriptor M3PEndStartWorkflowApplicationEvent;
private static readonly EventDescriptor M3PEndWorkflowExecutionEvent;
private static readonly EventDescriptor M3PErrorImportingWorkflowFromXamlEvent;
private static readonly EventDescriptor M3PForcedWorkflowShutdownErrorEvent;
private static readonly EventDescriptor M3PForcedWorkflowShutdownFinishedEvent;
private static readonly EventDescriptor M3PForcedWorkflowShutdownStartedEvent;
private static readonly EventDescriptor M3PImportedWorkflowFromXamlEvent;
private static readonly EventDescriptor M3PImportingWorkflowFromXamlEvent;
private static readonly EventDescriptor M3PJobCreationCompleteEvent;
private static readonly EventDescriptor M3PJobErrorEvent;
private static readonly EventDescriptor M3PJobRemovedEvent;
private static readonly EventDescriptor M3PJobRemoveErrorEvent;
private static readonly EventDescriptor M3PJobStateChangedEvent;
private static readonly EventDescriptor M3PLoadingWorkflowForExecutionEvent;
private static readonly EventDescriptor M3POutOfProcessRunspaceStartedEvent;
private static readonly EventDescriptor M3PParameterSplattingWasPerformedEvent;
private static readonly EventDescriptor M3PParentJobCreatedEvent;
private static readonly EventDescriptor M3PPersistenceStoreMaxSizeReachedEvent;
private static readonly EventDescriptor M3PPersistingWorkflowEvent;
private static readonly EventDescriptor M3PProxyJobRemoteJobAssociationEvent;
private static readonly EventDescriptor M3PRemoveJobStartedEvent;
private static readonly EventDescriptor M3PRunspaceAvailabilityChangedEvent;
private static readonly EventDescriptor M3PRunspaceStateChangedEvent;
private static readonly EventDescriptor M3PTrackingGuidContainerParentJobCorrelationEvent;
private static readonly EventDescriptor M3PUnloadingWorkflowEvent;
private static readonly EventDescriptor M3PWorkflowActivityExecutionFailedEvent;
private static readonly EventDescriptor M3PWorkflowActivityValidatedEvent;
private static readonly EventDescriptor M3PWorkflowActivityValidationFailedEvent;
private static readonly EventDescriptor M3PWorkflowCleanupPerformedEvent;
private static readonly EventDescriptor M3PWorkflowDeletedFromDiskEvent;
private static readonly EventDescriptor M3PWorkflowEngineStartedEvent;
private static readonly EventDescriptor M3PWorkflowExecutionAbortedEvent;
private static readonly EventDescriptor M3PWorkflowExecutionCancelledEvent;
private static readonly EventDescriptor M3PWorkflowExecutionErrorEvent;
private static readonly EventDescriptor M3PWorkflowExecutionFinishedEvent;
private static readonly EventDescriptor M3PWorkflowExecutionStartedEvent;
private static readonly EventDescriptor M3PWorkflowJobCreatedEvent;
private static readonly EventDescriptor M3PWorkflowLoadedForExecutionEvent;
private static readonly EventDescriptor M3PWorkflowLoadedFromDiskEvent;
private static readonly EventDescriptor M3PWorkflowManagerCheckpointEvent;
private static readonly EventDescriptor M3PWorkflowPersistedEvent;
private static readonly EventDescriptor M3PWorkflowPluginRequestedToShutdownEvent;
private static readonly EventDescriptor M3PWorkflowPluginRestartedEvent;
private static readonly EventDescriptor M3PWorkflowPluginStartedEvent;
private static readonly EventDescriptor M3PWorkflowQuotaViolatedEvent;
private static readonly EventDescriptor M3PWorkflowResumedEvent;
private static readonly EventDescriptor M3PWorkflowResumingEvent;
private static readonly EventDescriptor M3PWorkflowRunspacePoolCreatedEvent;
private static readonly EventDescriptor M3PWorkflowStateChangedEvent;
private static readonly EventDescriptor M3PWorkflowUnloadedEvent;
private static readonly EventDescriptor M3PWorkflowValidationErrorEvent;
private static readonly EventDescriptor M3PWorkflowValidationFinishedEvent;
private static readonly EventDescriptor M3PWorkflowValidationStartedEvent;
/// <summary>
/// Static constructor.