示例#1
0
        internal void UpdateFromProxy(Proxy_PCI proxy)
        {
            uuid        = proxy.uuid == null ? null : (string)proxy.uuid;
            class_name  = proxy.class_name == null ? null : (string)proxy.class_name;
            vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name;
            device_name = proxy.device_name == null ? null : (string)proxy.device_name;
            host        = proxy.host == null ? null : XenRef <Host> .Create(proxy.host);

            pci_id       = proxy.pci_id == null ? null : (string)proxy.pci_id;
            dependencies = proxy.dependencies == null ? null : XenRef <PCI> .Create(proxy.dependencies);

            other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
        }
示例#2
0
        public Proxy_PCI ToProxy()
        {
            Proxy_PCI result_ = new Proxy_PCI();

            result_.uuid         = (uuid != null) ? uuid : "";
            result_.class_name   = (class_name != null) ? class_name : "";
            result_.vendor_name  = (vendor_name != null) ? vendor_name : "";
            result_.device_name  = (device_name != null) ? device_name : "";
            result_.host         = (host != null) ? host : "";
            result_.pci_id       = (pci_id != null) ? pci_id : "";
            result_.dependencies = (dependencies != null) ? Helper.RefListToStringArray(dependencies) : new string[] {};
            result_.other_config = Maps.convert_to_proxy_string_string(other_config);
            return(result_);
        }
示例#3
0
文件: PCI.cs 项目: wuzhiwyyx/xenadmin
        public Proxy_PCI ToProxy()
        {
            Proxy_PCI result_ = new Proxy_PCI();

            result_.uuid                  = uuid ?? "";
            result_.class_name            = class_name ?? "";
            result_.vendor_name           = vendor_name ?? "";
            result_.device_name           = device_name ?? "";
            result_.host                  = host ?? "";
            result_.pci_id                = pci_id ?? "";
            result_.dependencies          = (dependencies != null) ? Helper.RefListToStringArray(dependencies) : new string[] {};
            result_.other_config          = Maps.convert_to_proxy_string_string(other_config);
            result_.subsystem_vendor_name = subsystem_vendor_name ?? "";
            result_.subsystem_device_name = subsystem_device_name ?? "";
            return(result_);
        }
示例#4
0
 /// <summary>
 /// Creates a new PCI from a Proxy_PCI.
 /// </summary>
 /// <param name="proxy"></param>
 public PCI(Proxy_PCI proxy)
 {
     this.UpdateFromProxy(proxy);
 }
示例#5
0
 /// <summary>
 /// Creates a new PCI from a Proxy_PCI.
 /// </summary>
 /// <param name="proxy"></param>
 public PCI(Proxy_PCI proxy)
 {
     UpdateFrom(proxy);
 }