Exemple #1
0
        public Libvirt_Pinvoke.CS_Objects.Container.LibvirtContainer <virInterface> virConnectListAllInterfaces(virConnectListAllInterfacesFlags flags)
        {
            virInterface[]    ifaces;
            virInterfacePtr[] ptrs;
            var ret = API.virConnectListAllInterfaces(_ConnectPtr, out ptrs, flags);

            if (ret > -1)
            {
                ifaces = new virInterface[ptrs.Length];
                for (var i = 0; i < ptrs.Length; i++)
                {
                    ifaces[i] = new virInterface(ptrs[i]);
                }
            }
            else
            {
                ifaces = new virInterface[0];
            }
            return(new Libvirt_Pinvoke.CS_Objects.Container.LibvirtContainer <virInterface>(ifaces));
        }
 public Libvirt_Pinvoke.CS_Objects.Container.LibvirtContainer<virInterface> virConnectListAllInterfaces(virConnectListAllInterfacesFlags flags)
 {
     virInterface[] ifaces;
     virInterfacePtr[] ptrs;
     var ret = API.virConnectListAllInterfaces(_ConnectPtr, out ptrs, flags);
     if (ret > -1)
     {
         ifaces = new virInterface[ptrs.Length];
         for (var i = 0; i < ptrs.Length; i++)
         {
             ifaces[i] = new virInterface(ptrs[i]);
         }
     }
     else ifaces = new virInterface[0];
     return new Libvirt_Pinvoke.CS_Objects.Container.LibvirtContainer<virInterface>(ifaces);
 }