Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 internal bool TryGet(string driveName, out PSDriveInfo info)
 {
     info = _scope.Get(driveName, false);
     return(info != null);
 }
Ejemplo n.º 3
0
 public PSVariable Get(string name)
 {
     return(_scope.Get(name, true));
 }