GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cleanup workflow - remove PSProxyJob (#10083) · PowerShell/PowerShell@18ff2b6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/System.Management.Automation
    • engine
      • hostifaces
        • PowerShell.cs
      • remoting/client
        • PSProxyJob.cs
    • resources
      • PowerShellStrings.resx
      • RemotingErrorIdStrings.resx
  • test/powershell/Host/TabCompletion
    • TabCompletion.Tests.ps1
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/System.Management.Automation/engine/hostifaces/PowerShell.cs‎

Copy file name to clipboardExpand all lines: src/System.Management.Automation/engine/hostifaces/PowerShell.cs
-72Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3896,29 +3896,6 @@ private void ResetOutputBufferAsNeeded()
38963896
}
38973897
}
38983898

3899-
/// <summary>
3900-
/// This has been added as a work around for Windows8 bug 803461.
3901-
/// It should be used only for the PSJobProxy API.
3902-
///
3903-
/// Resets the instance ID of the command to a new guid.
3904-
/// If this is not done, then there is a race condition on the server
3905-
/// in the following circumstances:
3906-
///
3907-
/// ps.BeginInvoke(...);
3908-
/// ps.Stop()
3909-
/// ps.Commands.Clear();
3910-
/// ps.AddCommand("Foo");
3911-
/// ps.Invoke();
3912-
///
3913-
/// In these conditions, stop returns before the server is done cleaning up.
3914-
/// The subsequent invoke will cause an error because the guid already
3915-
/// identifies a command in progress.
3916-
/// </summary>
3917-
internal void GenerateNewInstanceId()
3918-
{
3919-
InstanceId = Guid.NewGuid();
3920-
}
3921-
39223899
/// <summary>
39233900
/// Get a steppable pipeline object.
39243901
/// </summary>
@@ -5935,55 +5912,6 @@ internal void WaitForServicingComplete()
59355912

59365913
#endregion
59375914

5938-
#region V3 Extensions
5939-
5940-
/// <summary>
5941-
/// Returns a job object which can be used to
5942-
/// control the invocation of the command with
5943-
/// AsJob Parameter.
5944-
/// </summary>
5945-
/// <returns>Job object.</returns>
5946-
public PSJobProxy AsJobProxy()
5947-
{
5948-
// if there are no commands added
5949-
// throw an invalid operation exception
5950-
if (this.Commands.Commands.Count == 0)
5951-
{
5952-
throw PSTraceSource.NewInvalidOperationException(PowerShellStrings.GetJobForCommandRequiresACommand);
5953-
}
5954-
5955-
// if there is more than one command in the
5956-
// command collection throw an error
5957-
if (this.Commands.Commands.Count > 1)
5958-
{
5959-
throw PSTraceSource.NewInvalidOperationException(PowerShellStrings.GetJobForCommandNotSupported);
5960-
}
5961-
5962-
// check if the AsJob parameter has already
5963-
// been added. If not, add the same
5964-
bool found = false;
5965-
foreach (CommandParameter parameter in this.Commands.Commands[0].Parameters)
5966-
{
5967-
if (string.Compare(parameter.Name, "AsJob", StringComparison.OrdinalIgnoreCase) == 0)
5968-
{
5969-
found = true;
5970-
}
5971-
}
5972-
5973-
if (!found)
5974-
{
5975-
AddParameter("AsJob");
5976-
}
5977-
5978-
// initialize the job invoker and return the same
5979-
PSJobProxy job = new PSJobProxy(this.Commands.Commands[0].CommandText);
5980-
job.InitializeJobProxy(this.Commands, this.Runspace, this.RunspacePool);
5981-
5982-
return job;
5983-
}
5984-
5985-
#endregion V3 Extensions
5986-
59875915
#if !CORECLR // PSMI Not Supported On CSS
59885916
#region Win Blue Extensions
59895917

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.