public PSObject AsCustomObject() { if (this._sessionState == null) { throw PSTraceSource.NewInvalidOperationException("Modules", "InvalidOperationOnBinaryModule", new object[0]); } PSObject obj2 = new PSObject(); foreach (KeyValuePair <string, FunctionInfo> pair in this.ExportedFunctions) { FunctionInfo info = pair.Value; if (info != null) { PSScriptMethod member = new PSScriptMethod(info.Name, info.ScriptBlock); obj2.Members.Add(member); } } foreach (KeyValuePair <string, PSVariable> pair2 in this.ExportedVariables) { PSVariable variable = pair2.Value; if (variable != null) { PSVariableProperty property = new PSVariableProperty(variable); obj2.Members.Add(property); } } return(obj2); }
public override PSMemberInfo Copy() { PSNoteProperty destiny = new PSVariableProperty(this._variable); base.CloneBaseProperties(destiny); return(destiny); }
public PSObject AsCustomObject() { if (this._sessionState == null) { throw PSTraceSource.NewInvalidOperationException("Modules", "InvalidOperationOnBinaryModule", new object[0]); } PSObject obj2 = new PSObject(); foreach (KeyValuePair<string, FunctionInfo> pair in this.ExportedFunctions) { FunctionInfo info = pair.Value; if (info != null) { PSScriptMethod member = new PSScriptMethod(info.Name, info.ScriptBlock); obj2.Members.Add(member); } } foreach (KeyValuePair<string, PSVariable> pair2 in this.ExportedVariables) { PSVariable variable = pair2.Value; if (variable != null) { PSVariableProperty property = new PSVariableProperty(variable); obj2.Members.Add(property); } } return obj2; }
public override PSMemberInfo Copy() { PSNoteProperty destiny = new PSVariableProperty(this._variable); base.CloneBaseProperties(destiny); return destiny; }