internal InvocationInfo(CommandInfo commandInfo, IScriptExtent scriptPosition, ExecutionContext context) { this._historyId = -1L; this._pipelineIterationInfo = new int[0]; this._commandInfo = commandInfo; this._commandOrigin = System.Management.Automation.CommandOrigin.Internal; this._scriptPosition = scriptPosition; ExecutionContext context2 = null; if ((commandInfo != null) && (commandInfo.Context != null)) { context2 = commandInfo.Context; } else if (context != null) { context2 = context; } if (context2 != null) { LocalRunspace currentRunspace = context2.CurrentRunspace as LocalRunspace; if ((currentRunspace != null) && (currentRunspace.History != null)) { this._historyId = currentRunspace.History.GetNextHistoryId(); } } }
internal InvocationInfo(PSObject psObject) { this._historyId = -1L; this._pipelineIterationInfo = new int[0]; this._commandOrigin = (System.Management.Automation.CommandOrigin) SerializationUtilities.GetPsObjectPropertyBaseObject(psObject, "InvocationInfo_CommandOrigin"); this._expectingInput = (bool) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_ExpectingInput"); this._invocationName = (string) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_InvocationName"); this._historyId = (long) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_HistoryId"); this._pipelineLength = (int) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_PipelineLength"); this._pipelinePosition = (int) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_PipelinePosition"); string propertyValue = (string) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_ScriptName"); int scriptLineNumber = (int) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_ScriptLineNumber"); int offsetInLine = (int) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_OffsetInLine"); string line = (string) SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_Line"); System.Management.Automation.Language.ScriptPosition startPosition = new System.Management.Automation.Language.ScriptPosition(propertyValue, scriptLineNumber, offsetInLine, line); this._scriptPosition = new ScriptExtent(startPosition, startPosition); this._commandInfo = RemoteCommandInfo.FromPSObjectForRemoting(psObject); ArrayList psObjectPropertyBaseObject = (ArrayList) SerializationUtilities.GetPsObjectPropertyBaseObject(psObject, "InvocationInfo_PipelineIterationInfo"); if (psObjectPropertyBaseObject != null) { this._pipelineIterationInfo = (int[]) psObjectPropertyBaseObject.ToArray(Type.GetType("System.Int32")); } else { this._pipelineIterationInfo = new int[0]; } Hashtable hashtable = (Hashtable) SerializationUtilities.GetPsObjectPropertyBaseObject(psObject, "InvocationInfo_BoundParameters"); Dictionary<string, object> dictionary = new Dictionary<string, object>(); if (hashtable != null) { foreach (DictionaryEntry entry in hashtable) { dictionary.Add((string) entry.Key, entry.Value); } } this._boundParameters = dictionary; ArrayList list2 = (ArrayList) SerializationUtilities.GetPsObjectPropertyBaseObject(psObject, "InvocationInfo_UnboundArguments"); this._unboundArguments = new List<object>(); if (list2 != null) { foreach (object obj2 in list2) { this._unboundArguments.Add(obj2); } } object obj3 = SerializationUtilities.GetPropertyValue(psObject, "SerializeExtent"); bool flag = false; if (obj3 != null) { flag = (bool) obj3; } if (flag) { this._displayScriptPosition = ScriptExtent.FromPSObjectForRemoting(psObject); } }
internal HelpRequest(string target, System.Management.Automation.HelpCategory helpCategory) { this._target = target; this._helpCategory = helpCategory; this._origin = System.Management.Automation.CommandOrigin.Runspace; }
internal CommandLookupEventArgs(string commandName, System.Management.Automation.CommandOrigin commandOrigin, ExecutionContext context) { this.commandName = commandName; this.commandOrigin = commandOrigin; this.context = context; }
internal InvocationInfo(CommandInfo commandInfo, IScriptExtent scriptPosition, ExecutionContext context) { this._historyId = -1L; this._pipelineIterationInfo = new int[0]; this._commandInfo = commandInfo; this._commandOrigin = System.Management.Automation.CommandOrigin.Internal; this._scriptPosition = scriptPosition; ExecutionContext context2 = null; if ((commandInfo != null) && (commandInfo.Context != null)) { context2 = commandInfo.Context; } else if (context != null) { context2 = context; } if (context2 != null) { LocalRunspace currentRunspace = context2.CurrentRunspace as LocalRunspace; if ((currentRunspace != null) && (currentRunspace.History != null)) { this._historyId = currentRunspace.History.GetNextHistoryId(); } } }
internal InvocationInfo(InternalCommand command) : this(command.CommandInfo, command.InvocationExtent ?? PositionUtilities.EmptyExtent) { this._commandOrigin = command.CommandOrigin; }
internal HelpRequest(string target, System.Management.Automation.HelpCategory helpCategory) { this._target = target; this._helpCategory = helpCategory; this._origin = System.Management.Automation.CommandOrigin.Runspace; }
internal CommandLookupEventArgs(string commandName, System.Management.Automation.CommandOrigin commandOrigin, ExecutionContext context) { this.commandName = commandName; this.commandOrigin = commandOrigin; this.context = context; }
internal InvocationInfo(PSObject psObject) { this._historyId = -1L; this._pipelineIterationInfo = new int[0]; this._commandOrigin = (System.Management.Automation.CommandOrigin)SerializationUtilities.GetPsObjectPropertyBaseObject(psObject, "InvocationInfo_CommandOrigin"); this._expectingInput = (bool)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_ExpectingInput"); this._invocationName = (string)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_InvocationName"); this._historyId = (long)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_HistoryId"); this._pipelineLength = (int)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_PipelineLength"); this._pipelinePosition = (int)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_PipelinePosition"); string propertyValue = (string)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_ScriptName"); int scriptLineNumber = (int)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_ScriptLineNumber"); int offsetInLine = (int)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_OffsetInLine"); string line = (string)SerializationUtilities.GetPropertyValue(psObject, "InvocationInfo_Line"); System.Management.Automation.Language.ScriptPosition startPosition = new System.Management.Automation.Language.ScriptPosition(propertyValue, scriptLineNumber, offsetInLine, line); this._scriptPosition = new ScriptExtent(startPosition, startPosition); this._commandInfo = RemoteCommandInfo.FromPSObjectForRemoting(psObject); ArrayList psObjectPropertyBaseObject = (ArrayList)SerializationUtilities.GetPsObjectPropertyBaseObject(psObject, "InvocationInfo_PipelineIterationInfo"); if (psObjectPropertyBaseObject != null) { this._pipelineIterationInfo = (int[])psObjectPropertyBaseObject.ToArray(Type.GetType("System.Int32")); } else { this._pipelineIterationInfo = new int[0]; } Hashtable hashtable = (Hashtable)SerializationUtilities.GetPsObjectPropertyBaseObject(psObject, "InvocationInfo_BoundParameters"); Dictionary <string, object> dictionary = new Dictionary <string, object>(); if (hashtable != null) { foreach (DictionaryEntry entry in hashtable) { dictionary.Add((string)entry.Key, entry.Value); } } this._boundParameters = dictionary; ArrayList list2 = (ArrayList)SerializationUtilities.GetPsObjectPropertyBaseObject(psObject, "InvocationInfo_UnboundArguments"); this._unboundArguments = new List <object>(); if (list2 != null) { foreach (object obj2 in list2) { this._unboundArguments.Add(obj2); } } object obj3 = SerializationUtilities.GetPropertyValue(psObject, "SerializeExtent"); bool flag = false; if (obj3 != null) { flag = (bool)obj3; } if (flag) { this._displayScriptPosition = ScriptExtent.FromPSObjectForRemoting(psObject); } }
internal InvocationInfo(InternalCommand command) : this(command.CommandInfo, command.InvocationExtent ?? PositionUtilities.EmptyExtent) { this._commandOrigin = command.CommandOrigin; }