X Tutup
Skip to content
Merged
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 @@ -2024,7 +2024,6 @@ private static void GenerateSectionSeparator(TextWriter writer)

PrivateData = @{{
ImplicitRemoting = $true
ImplicitSessionId = '{4}'
}}
}}
";
Expand All @@ -2043,8 +2042,7 @@ private void GenerateManifest(TextWriter writer, string psm1fileName, string for
CodeGeneration.EscapeSingleQuotedStringContent(_moduleGuid.ToString()),
CodeGeneration.EscapeSingleQuotedStringContent(StringUtil.Format(ImplicitRemotingStrings.ProxyModuleDescription, this.GetConnectionString())),
CodeGeneration.EscapeSingleQuotedStringContent(Path.GetFileName(psm1fileName)),
CodeGeneration.EscapeSingleQuotedStringContent(Path.GetFileName(formatPs1xmlFileName)),
_remoteRunspaceInfo.InstanceId);
CodeGeneration.EscapeSingleQuotedStringContent(Path.GetFileName(formatPs1xmlFileName)));
}

#endregion
Expand Down
16 changes: 0 additions & 16 deletions src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,22 +321,6 @@ internal Collection<PSObject> ExecuteCommand(string command, out Exception excep
{
Dbg.Assert(!string.IsNullOrEmpty(command), "command should have a value");

// Experimental:
// Check for implicit remoting commands that can be batched, and execute as batched if able.
if (ExperimentalFeature.IsEnabled("PSImplicitRemotingBatching"))
{
var addOutputter = ((options & ExecutionOptions.AddOutputter) > 0);
if (addOutputter &&
!_parent.RunspaceRef.IsRunspaceOverridden &&
_parent.RunspaceRef.Runspace.ExecutionContext.Modules != null &&
_parent.RunspaceRef.Runspace.ExecutionContext.Modules.IsImplicitRemotingModuleLoaded &&
Utils.TryRunAsImplicitBatch(command, _parent.RunspaceRef.Runspace))
{
exceptionThrown = null;
return null;
}
}

Pipeline tempPipeline = CreatePipeline(command, (options & ExecutionOptions.AddToHistory) > 0);

return ExecuteCommandHelper(tempPipeline, out exceptionThrown, options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ static ExperimentalFeature()
name: "PSFileSystemProviderV2",
description: "Replace the old FileSystemProvider with cleaner design and faster code"),
*/
new ExperimentalFeature(
name: "PSImplicitRemotingBatching",
description: "Batch implicit remoting proxy commands to improve performance"),
new ExperimentalFeature(
name: "PSCommandNotFoundSuggestion",
description: "Recommend potential commands based on fuzzy search on a CommandNotFoundException"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5177,21 +5177,6 @@ internal void RemoveModule(PSModuleInfo module, string moduleNameInRemoveModuleC

// And the appdomain level module path cache.
PSModuleInfo.RemoveFromAppDomainLevelCache(module.Name);

// Update implicit module loaded property
if (Context.Modules.IsImplicitRemotingModuleLoaded)
{
Context.Modules.IsImplicitRemotingModuleLoaded = false;
foreach (var modInfo in Context.Modules.ModuleTable.Values)
{
var privateData = modInfo.PrivateData as Hashtable;
if ((privateData != null) && privateData.ContainsKey("ImplicitRemoting"))
{
Context.Modules.IsImplicitRemotingModuleLoaded = true;
break;
}
}
}
}
}
}
Expand Down Expand Up @@ -6924,13 +6909,6 @@ internal static void AddModuleToModuleTables(ExecutionContext context, SessionSt
{
targetSessionState.Module.AddNestedModule(module);
}

var privateDataHashTable = module.PrivateData as Hashtable;
if (!context.Modules.IsImplicitRemotingModuleLoaded &&
privateDataHashTable != null && privateDataHashTable.ContainsKey("ImplicitRemoting"))
{
context.Modules.IsImplicitRemotingModuleLoaded = true;
}
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ internal ModuleIntrinsics(ExecutionContext context)

private const int MaxModuleNestingDepth = 10;

/// <summary>
/// Gets and sets boolean that indicates when an implicit remoting module is loaded.
/// </summary>
internal bool IsImplicitRemotingModuleLoaded
{
get;
set;
}

internal void IncrementModuleNestingDepth(PSCmdlet cmdlet, string path)
{
if (++ModuleNestingDepth > MaxModuleNestingDepth)
Expand Down
Loading
X Tutup