Beispiel #1
0
 internal void UpdateFromProxy(Proxy_PIF_metrics proxy)
 {
     this.uuid         = (proxy.uuid == null) ? null : proxy.uuid;
     this.io_read_kbs  = Convert.ToDouble(proxy.io_read_kbs);
     this.io_write_kbs = Convert.ToDouble(proxy.io_write_kbs);
     this.carrier      = proxy.carrier;
     this.vendor_id    = (proxy.vendor_id == null) ? null : proxy.vendor_id;
     this.vendor_name  = (proxy.vendor_name == null) ? null : proxy.vendor_name;
     this.device_id    = (proxy.device_id == null) ? null : proxy.device_id;
     this.device_name  = (proxy.device_name == null) ? null : proxy.device_name;
     this.speed        = (proxy.speed == null) ? 0L : long.Parse(proxy.speed);
     this.duplex       = proxy.duplex;
     this.pci_bus_path = (proxy.pci_bus_path == null) ? null : proxy.pci_bus_path;
     this.last_updated = proxy.last_updated;
     this.other_config = (proxy.other_config == null) ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
 }
Beispiel #2
0
 public PIF_metrics(Proxy_PIF_metrics proxy)
 {
     this.UpdateFromProxy(proxy);
 }