@@ -3896,29 +3896,6 @@ private void ResetOutputBufferAsNeeded() |
3896 | 3896 | } |
3897 | 3897 | } |
3898 | 3898 |
|
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 | | - |
3922 | 3899 | /// <summary> |
3923 | 3900 | /// Get a steppable pipeline object. |
3924 | 3901 | /// </summary> |
@@ -5935,55 +5912,6 @@ internal void WaitForServicingComplete() |
5935 | 5912 |
|
5936 | 5913 | #endregion |
5937 | 5914 |
|
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 | | - |
5987 | 5915 | #if !CORECLR // PSMI Not Supported On CSS |
5988 | 5916 | #region Win Blue Extensions |
5989 | 5917 |
|
|