示例#1
0
文件: Lun.cs 项目: radtek/vhddirector
        public LunInformation GetIdentificationData()
        {
            LunInformation information2;

            this.InitializeComInterfaces();
            try
            {
                VdsLunInformation information;
                this.lun.GetIdentificationData(out information);
                information2 = new LunInformation(information);
            }
            catch (COMException exception)
            {
                throw new VdsException("The call to IVdsLun::GetIdentificationData failed.", exception);
            }
            return(information2);
        }
示例#2
0
        public Guid GetDiskIdFromLunInfo(LunInformation lunInfo)
        {
            Guid guid;

            this.InitializeComInterfaces();
            if (lunInfo == null)
            {
                throw new ArgumentNullException("lunInfo");
            }
            if (this.uninstallDisk == null)
            {
                throw new NotSupportedException("Uninstall disk methods are not supported in this version of the service.");
            }
            try
            {
                this.uninstallDisk.GetDiskIdFromLunInfo(lunInfo.Info, out guid);
            }
            catch (COMException exception)
            {
                throw new VdsException("The call to IVdsUninstallDisk::GetDiskIdFromLunInfo failed.", exception);
            }
            return(guid);
        }