public PSDriveInfo Get(string driveName) { var drive = _scope.Get(driveName, false); if (drive == null) { //PS 2.0 throws an exception here instead of returning null throw new MethodInvocationException(String.Format(driveDoesntExistFormat, driveName)); } return(drive); }
internal bool TryGet(string driveName, out PSDriveInfo info) { info = _scope.Get(driveName, false); return(info != null); }
public PSVariable Get(string name) { return(_scope.Get(name, true)); }