Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands/ShowCommandProxy.cs
Decompiler Source FileMicrosoft.PowerShell.Commands.Utility.ShowCommandProxyDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- CallMethod: ShowAllModulesWindow at line 45
- CallMethod: ShowCommandWindow at line 50
- CallMethod: CloseWindow at line 55
- CallMethod: GetScript at line 60
- CallMethod: ShowErrorString at line 65
- CallMethod: SetPendingISECommand at line 70
- CallMethod: DisplayHelp at line 100
- CallMethod: ImportModuleDone at line 115
- CallMethod: ImportModuleFailed at line 120
- CallMethod: ActivateWindow at line 125
Typed Edges
- No typed edges extracted for this source.
References
- No direct source references extracted.
Referenced By
- No direct source references extracted.
C# source-derived context
Generated by pattern extraction from the decompiled C# source and decompile index. This is factual source evidence, not inferred behavior.
references DB/Dialog objects
Summary: classes ShowCommandProxy; methods ShowAllModulesWindow, ShowCommandWindow, CloseWindow, GetScript, ShowErrorString, SetPendingISECommand; references ESet; markers references DB/Dialog objects
Classes
ShowCommandProxyMethods
DB/Dialog object references
OIM key/entity markers
None extracted.API/entity calls
None extracted.Registrations / handlers
None extracted.
Complete Source
1using System;2using System.Collections.Generic;3using System.Collections.ObjectModel;4using System.Management.Automation;5using System.Management.Automation.Internal;6using System.Threading;7using Microsoft.PowerShell.Commands.ShowCommandExtension;89namespace Microsoft.PowerShell.Commands;1011internal class ShowCommandProxy12{13 private const string ShowCommandHelperName = "Microsoft.PowerShell.Commands.ShowCommandInternal.ShowCommandHelper";1415 private readonly ShowCommandCommand _cmdlet;1617 private readonly GraphicalHostReflectionWrapper _graphicalHostReflectionWrapper;1819 internal bool HasHostWindow => (bool)_graphicalHostReflectionWrapper.GetPropertyValue("HasHostWindow");2021 internal AutoResetEvent WindowClosed => (AutoResetEvent)_graphicalHostReflectionWrapper.GetPropertyValue("WindowClosed");2223 internal AutoResetEvent HelpNeeded => (AutoResetEvent)_graphicalHostReflectionWrapper.GetPropertyValue("HelpNeeded");2425 internal AutoResetEvent ImportModuleNeeded => (AutoResetEvent)_graphicalHostReflectionWrapper.GetPropertyValue("ImportModuleNeeded");2627 internal AutoResetEvent WindowLoaded => (AutoResetEvent)_graphicalHostReflectionWrapper.GetPropertyValue("WindowLoaded");2829 internal string CommandNeedingHelp => (string)_graphicalHostReflectionWrapper.GetPropertyValue("CommandNeedingHelp");3031 internal string ParentModuleNeedingImportModule => (string)_graphicalHostReflectionWrapper.GetPropertyValue("ParentModuleNeedingImportModule");3233 internal double ScreenWidth => (double)_graphicalHostReflectionWrapper.GetStaticPropertyValue("ScreenWidth");3435 internal double ScreenHeight => (double)_graphicalHostReflectionWrapper.GetStaticPropertyValue("ScreenHeight");3637 internal ShowCommandProxy(ShowCommandCommand cmdlet)38 {39 _cmdlet = cmdlet;40 _graphicalHostReflectionWrapper = GraphicalHostReflectionWrapper.GetGraphicalHostReflectionWrapper(cmdlet, "Microsoft.PowerShell.Commands.ShowCommandInternal.ShowCommandHelper");41 }4243 internal void ShowAllModulesWindow(Dictionary<string, ShowCommandModuleInfo> importedModules, IEnumerable<ShowCommandCommandInfo> commands, bool noCommonParameter, bool passThrough)44 {45 _graphicalHostReflectionWrapper.CallMethod("ShowAllModulesWindow", _cmdlet, importedModules, commands, noCommonParameter, _cmdlet.Width, _cmdlet.Height, passThrough);46 }4748 internal void ShowCommandWindow(object commandViewModelObj, bool passThrough)49 {50 _graphicalHostReflectionWrapper.CallMethod("ShowCommandWindow", _cmdlet, commandViewModelObj, _cmdlet.Width, _cmdlet.Height, passThrough);51 }5253 internal void CloseWindow()54 {55 _graphicalHostReflectionWrapper.CallMethod("CloseWindow");56 }5758 internal string GetScript()59 {60 return (string)_graphicalHostReflectionWrapper.CallMethod("GetScript");61 }6263 internal void ShowErrorString(string error)64 {65 _graphicalHostReflectionWrapper.CallMethod("ShowErrorString", error);66 }6768 internal bool SetPendingISECommand(string command)69 {70 return (bool)_graphicalHostReflectionWrapper.CallMethod("SetPendingISECommand", command);71 }7273 internal object GetCommandViewModel(ShowCommandCommandInfo command, bool noCommonParameter, Dictionary<string, ShowCommandModuleInfo> importedModules, bool moduleQualify)74 {75 return _graphicalHostReflectionWrapper.CallStaticMethod("GetCommandViewModel", command, noCommonParameter, importedModules, moduleQualify);76 }7778 internal string GetShowCommandCommand(string commandName, bool includeAliasAndModules)79 {80 return (string)_graphicalHostReflectionWrapper.CallStaticMethod("GetShowCommandCommand", commandName, includeAliasAndModules);81 }8283 internal string GetShowAllModulesCommand()84 {85 return (string)_graphicalHostReflectionWrapper.CallStaticMethod("GetShowAllModulesCommand", false, true);86 }8788 internal Dictionary<string, ShowCommandModuleInfo> GetImportedModulesDictionary(object[] moduleObjects)89 {90 return (Dictionary<string, ShowCommandModuleInfo>)_graphicalHostReflectionWrapper.CallStaticMethod("GetImportedModulesDictionary", new object[1] { moduleObjects });91 }9293 internal List<ShowCommandCommandInfo> GetCommandList(object[] commandObjects)94 {95 return (List<ShowCommandCommandInfo>)_graphicalHostReflectionWrapper.CallStaticMethod("GetCommandList", new object[1] { commandObjects });96 }9798 internal void DisplayHelp(Collection<PSObject> helpResults)99 {100 _graphicalHostReflectionWrapper.CallMethod("DisplayHelp", helpResults);101 }102103 internal string GetImportModuleCommand(string module)104 {105 return (string)_graphicalHostReflectionWrapper.CallStaticMethod("GetImportModuleCommand", module, false, true);106 }107108 internal string GetHelpCommand(string command)109 {110 return (string)_graphicalHostReflectionWrapper.CallStaticMethod("GetHelpCommand", command);111 }112113 internal void ImportModuleDone(Dictionary<string, ShowCommandModuleInfo> importedModules, IEnumerable<ShowCommandCommandInfo> commands)114 {115 _graphicalHostReflectionWrapper.CallMethod("ImportModuleDone", importedModules, commands);116 }117118 internal void ImportModuleFailed(Exception reason)119 {120 _graphicalHostReflectionWrapper.CallMethod("ImportModuleFailed", reason);121 }122123 internal void ActivateWindow()124 {125 _graphicalHostReflectionWrapper.CallMethod("ActivateWindow");126 }127}128