// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Management.Automation.Runspaces; using Dbg = System.Management.Automation.Diagnostics; namespace System.Management.Automation { /// /// Defines type which has information about RunspacePoolState /// and exception associated with that state. /// /// This class is created so that a state change along /// with its reason can be transported from the server to the /// client in case of RemoteRunspacePool public sealed class RunspacePoolStateInfo { /// /// State of the runspace pool when this event occurred. /// public RunspacePoolState State { get; } /// /// Exception associated with that state. /// public Exception Reason { get; } /// /// Constructor for creating the state info. /// /// State. /// exception that resulted in this /// state change. Can be null public RunspacePoolStateInfo(RunspacePoolState state, Exception reason) { State = state; Reason = reason; } } }