Repository: PowerShell/PowerShell
File: src/System.Management.Automation/engine/EventManager.cs (C#)

Code before:
            ForwardEvent?.Invoke(this, e);
        }
    }

    /// <summary>
    /// Constants that represent PowerShell engine events.
    /// </summary>
    // Note: If you generate a new engine event that happens frequently,
    // (i.e.: variable changes), the user should be required to enable
    // that engine event before they make it into the ReceivedEvents channel.
    public sealed class PSEngineEvent
    {
        private PSEngineEvent() { }

        /// <summary>
        /// Called when the PowerShell engine is exiting.
        /// </summary>
        public const string Exiting = "PowerShell.Exiting";

        /// <summary>
        /// Call when the PowerShell engine is idle.
        /// </summary>
        public const string OnIdle = "PowerShell.OnIdle";

        /// <summary>
        /// Called when Debug-Runspace has attached a debugger to the current runspace.
        /// </summary>
        public const string OnDebugAttach = "PowerShell.OnDebugAttach";

        /// <summary>
        /// Called during scriptblock invocation.
        /// </summary>
        internal const string OnScriptBlockInvoke = "PowerShell.OnScriptBlockInvoke";

        /// <summary>
        /// Called during scriptblock invocation.
        /// </summary>
        internal const string GetCommandInfoParameterMetadata = "PowerShell.GetCommandInfoParameterMetadata";

        /// <summary>
        /// A HashSet that contains all engine event names.
        /// </summary>
        internal static readonly HashSet<string> EngineEvents = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { Exiting, OnIdle, OnDebugAttach, OnScriptBlockInvoke };
    }

    /// <summary>
    /// Represents a subscriber to an event.
    /// </summary>
    public class PSEventSubscriber : IEquatable<PSEventSubscriber>
    {
        /// <summary>

Review comment (bug):
```suggestion
        /// Called when <c>Debug-Runspace</c> has attached a debugger to the current runspace.
```

Code after:
            ForwardEvent?.Invoke(this, e);
        }
    }

    /// <summary>
    /// Constants that represent PowerShell engine events.
    /// </summary>
    // Note: If you generate a new engine event that happens frequently,
    // (i.e.: variable changes), the user should be required to enable
    // that engine event before they make it into the ReceivedEvents channel.
    public sealed class PSEngineEvent
    {
        private PSEngineEvent() { }

        /// <summary>
        /// Called when the PowerShell engine is exiting.
        /// </summary>
        public const string Exiting = "PowerShell.Exiting";

        /// <summary>
        /// Call when the PowerShell engine is idle.
        /// </summary>
        public const string OnIdle = "PowerShell.OnIdle";

        /// <summary>
        /// Called when <c>Debug-Runspace</c> has attached a debugger to the current runspace.
        /// </summary>
        public const string OnDebugAttach = "PowerShell.OnDebugAttach";

        /// <summary>
        /// Called during scriptblock invocation.
        /// </summary>
        internal const string OnScriptBlockInvoke = "PowerShell.OnScriptBlockInvoke";

        /// <summary>
        /// Called during scriptblock invocation.
        /// </summary>
        internal const string GetCommandInfoParameterMetadata = "PowerShell.GetCommandInfoParameterMetadata";

        /// <summary>
        /// A HashSet that contains all engine event names.
        /// </summary>
        internal static readonly HashSet<string> EngineEvents = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { Exiting, OnIdle, OnDebugAttach, OnScriptBlockInvoke };
    }

    /// <summary>
    /// Represents a subscriber to an event.
    /// </summary>
    public class PSEventSubscriber : IEquatable<PSEventSubscriber>
    {
        /// <summary>