コード例 #1
0
ファイル: Host.cs プロジェクト: kekekeks/libvirt-bindings
        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));
        }
コード例 #2
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);
 }