Beispiel #1
0
        public Libvirt_Pinvoke.CS_Objects.Container.LibvirtContainer <Storage_Pool> virConnectListAllStoragePools(virConnectListAllStoragePoolsFlags flags)
        {
            Storage_Pool[]      pools;
            virStoragePoolPtr[] ptrs;
            var ret = API.virConnectListAllStoragePools(_ConnectPtr, out ptrs, flags);

            if (ret > -1)
            {
                pools = new Storage_Pool[ptrs.Length];
                for (var i = 0; i < ptrs.Length; i++)
                {
                    pools[i] = new Storage_Pool(ptrs[i]);
                }
            }
            else
            {
                pools = new Storage_Pool[0];
            }

            return(new Libvirt_Pinvoke.CS_Objects.Container.LibvirtContainer <Storage_Pool>(pools));
        }
Beispiel #2
0
        public Libvirt_Pinvoke.CS_Objects.Container.LibvirtContainer<Storage_Pool> virConnectListAllStoragePools(virConnectListAllStoragePoolsFlags flags)
        {
            Storage_Pool[] pools;
            virStoragePoolPtr[] ptrs;
            var ret = API.virConnectListAllStoragePools(_ConnectPtr, out ptrs, flags);
            if (ret > -1)
            {
                pools = new Storage_Pool[ptrs.Length];
                for (var i = 0; i < ptrs.Length; i++)
                {
                    pools[i] = new Storage_Pool(ptrs[i]);
                }
            }
            else pools = new Storage_Pool[0];

            return new Libvirt_Pinvoke.CS_Objects.Container.LibvirtContainer<Storage_Pool>(pools);
        }