internal PSVariable GetVariable(string name) { if (string.IsNullOrEmpty(name)) throw new NullReferenceException("Variable name can't be empty."); return this.SessionState.PSVariable.Get(name); }
public object GetVariable(string name) { if (string.IsNullOrEmpty(name)) { throw new NullReferenceException("Variable name can't be empty."); } return(ExecutionContext.GetVariable(name)); }