Beispiel #1
0
 public List <Vapp> GetChildrenVapps()
 {
     try
     {
         if (this._childrenvApps == null)
         {
             this._childrenvApps = new List <Vapp>();
             if (this.Resource.Children != null)
             {
                 VAppChildrenType children = this.Resource.Children;
                 if (children != null && children.VApp != null)
                 {
                     foreach (VAppType vAppType in children.VApp)
                     {
                         this._childrenvApps.Add(new Vapp(this.VcloudClient, vAppType));
                     }
                 }
             }
         }
         return(this._childrenvApps);
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
Beispiel #2
0
 public List <VM> GetChildrenVms()
 {
     try
     {
         if (this._childrenVms == null)
         {
             this._childrenVms = new List <VM>();
             if (this.Resource.Children != null)
             {
                 VAppChildrenType children = this.Resource.Children;
                 if (children != null && children.Vm != null)
                 {
                     foreach (VmType vmType in ((IEnumerable <VmType>)children.Vm).ToList <VmType>())
                     {
                         this._childrenVms.Add(new VM(this.VcloudClient, vmType));
                     }
                 }
             }
         }
         return(this._childrenVms);
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }