Пример #1
0
        public static DvdDriveInfo Get(PowerShellManager powerShell, string vmName)
        {
            DvdDriveInfo info = null;

            PSObject result = GetPS(powerShell, vmName);

            if (result != null)
            {
                info = new DvdDriveInfo();
                info.Id = result.GetString("Id");
                info.Name = result.GetString("Name");
                info.ControllerType = result.GetEnum<ControllerType>("ControllerType");
                info.ControllerNumber = result.GetInt("ControllerNumber");
                info.ControllerLocation = result.GetInt("ControllerLocation");
                info.Path = result.GetString("Path");
            }
            return info;
        }
Пример #2
0
        public static DvdDriveInfo Get(PowerShellManager powerShell, string vmName)
        {
            DvdDriveInfo info = null;

            PSObject result = GetPS(powerShell, vmName);

            if (result != null)
            {
                info                    = new DvdDriveInfo();
                info.Id                 = result.GetString("Id");
                info.Name               = result.GetString("Name");
                info.ControllerType     = result.GetEnum <ControllerType>("ControllerType");
                info.ControllerNumber   = result.GetInt("ControllerNumber");
                info.ControllerLocation = result.GetInt("ControllerLocation");
                info.Path               = result.GetString("Path");
            }
            return(info);
        }