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); } }
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); } }