Exemplo n.º 1
0
 public void SetUnmaskingList(UnmaskingList list)
 {
     if (list == null)
     {
         throw new ArgumentNullException("list");
     }
     this.InitializeComInterfaces();
     try
     {
         this.lun.SetMask(list.ToString());
     }
     catch (COMException exception)
     {
         throw new VdsException("The call to IVdsLun::SetMask failed.", exception);
     }
     this.refresh = true;
 }
Exemplo n.º 2
0
        public Async BeginCreateLun(LunType type, ulong sizeInBytes, Guid[] driveIdArray, UnmaskingList unmaskingList, LunHints hints, AsyncCallback callback, object state)
        {
            IVdsAsync async;

            if (unmaskingList == null)
            {
                throw new ArgumentNullException("unmaskingList");
            }
            if (hints == null)
            {
                throw new ArgumentNullException("hints");
            }
            Hints hints2 = hints.Hints;

            this.InitializeComInterfaces();
            try
            {
                this.subSystem.CreateLun(type, sizeInBytes, (driveIdArray.Length != 0) ? driveIdArray : null, driveIdArray.Length, unmaskingList.ToString(), ref hints2, out async);
            }
            catch (COMException exception)
            {
                throw new VdsException("The call to IVdsSubSystem::CreateLun failed.", exception);
            }
            Async async2 = new Async(async, callback, state);

            new Thread(new ThreadStart(async2.Wait)).Start();
            return(async2);
        }