Add public API for RemoteRunspace ShouldCloseOnPop by jborean93 · Pull Request #28197 · PowerShell/PowerShell · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ protected bool ByPassRunspaceStateCheck
}

/// <summary>
/// Temporary place to remember whether to close this runspace on pop or not.
/// Used by Start-PSSession.
/// Whether to close this runspace when it is popped from an interactive session host.
/// Set by Enter-PSSession for runspaces it creates or publicly through <see cref="Runspace.SetShouldCloseOnPop"/>.
/// </summary>
internal bool ShouldCloseOnPop { get; set; } = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,7 @@
<data name="PrimaryRunspaceAlreadySet" xml:space="preserve">
<value>The static PrimaryRunspace property can only be set once, and has already been set.</value>
</data>
<data name="ShouldCloseOnPopNotRemote" xml:space="preserve">
<value>Only a remote runspace can be marked to close when it is popped.</value>
</data>
</root>
119 changes: 119 additions & 0 deletions test/powershell/engine/Remoting/RunspaceShouldCloseOnPop.Tests.ps1
Loading