/// <summary> /// Creates a new instance of the RunspaceDetails class. /// </summary> /// <param name="instanceId"> /// The InstanceId Guid for the runspace. /// </param> /// <param name="runspace"> /// The runspace for which this instance contains details. /// </param> /// <param name="powerShellVersion"> /// The PowerShellVersionDetails of the runspace. /// </param> /// <param name="runspaceLocation"> /// The RunspaceLocale of the runspace. /// </param> /// <param name="connectionString"> /// The connection string of the runspace. /// </param> public RunspaceDetails( Guid instanceId, Runspace runspace, PowerShellVersionDetails powerShellVersion, RunspaceLocation runspaceLocation, string connectionString) { this.Id = instanceId; this.Runspace = runspace; this.PowerShellVersion = powerShellVersion; this.Location = runspaceLocation; this.ConnectionString = connectionString; }
/// <summary> /// Creates a new instance of the RunspaceDetails class. /// </summary> /// <param name="runspace"> /// The runspace for which this instance contains details. /// </param> /// <param name="powerShellVersion"> /// The PowerShellVersionDetails of the runspace. /// </param> /// <param name="runspaceLocation"> /// The RunspaceLocale of the runspace. /// </param> /// <param name="connectionString"> /// The connection string of the runspace. /// </param> public RunspaceDetails( Runspace runspace, PowerShellVersionDetails powerShellVersion, RunspaceLocation runspaceLocation, string connectionString) : this( runspace.InstanceId, runspace, powerShellVersion, runspaceLocation, connectionString) { }
/// <summary> /// Creates a new instance of the RunspaceDetails class. /// </summary> /// <param name="runspace"> /// The runspace for which this instance contains details. /// </param> /// <param name="sessionDetails"> /// The SessionDetails for the runspace. /// </param> /// <param name="powerShellVersion"> /// The PowerShellVersionDetails of the runspace. /// </param> /// <param name="runspaceLocation"> /// The RunspaceLocation of the runspace. /// </param> /// <param name="runspaceContext"> /// The RunspaceContext of the runspace. /// </param> /// <param name="connectionString"> /// The connection string of the runspace. /// </param> public RunspaceDetails( Runspace runspace, SessionDetails sessionDetails, PowerShellVersionDetails powerShellVersion, RunspaceLocation runspaceLocation, RunspaceContext runspaceContext, string connectionString) { this.Runspace = runspace; this.SessionDetails = sessionDetails; this.PowerShellVersion = powerShellVersion; this.Location = runspaceLocation; this.Context = runspaceContext; this.ConnectionString = connectionString; }
/// <summary> /// Creates a new RunspaceDetails object from a remote /// debugging session. /// </summary> /// <param name="runspaceDetails"> /// The RunspaceDetails object which the new object based. /// </param> /// <param name="runspaceLocation"> /// The RunspaceLocation of the runspace. /// </param> /// <param name="runspaceContext"> /// The RunspaceContext of the runspace. /// </param> /// <param name="sessionDetails"> /// The SessionDetails for the runspace. /// </param> /// <returns> /// A new RunspaceDetails instance for the attached runspace. /// </returns> public static RunspaceDetails CreateFromDebugger( RunspaceDetails runspaceDetails, RunspaceLocation runspaceLocation, RunspaceContext runspaceContext, SessionDetails sessionDetails) { // TODO: Get the PowerShellVersion correctly! return (new RunspaceDetails( runspaceDetails.Runspace, sessionDetails, runspaceDetails.PowerShellVersion, runspaceLocation, runspaceContext, runspaceDetails.ConnectionString)); }