convert_from_proxy_string_vm_operations(Object o) { Hashtable table = (Hashtable)o; Dictionary <string, vm_operations> result = new Dictionary <string, vm_operations>(); if (table != null) { foreach (string key in table.Keys) { try { string k = key; vm_operations v = table[key] == null ? (vm_operations)0 : (vm_operations)Helper.EnumParseDefault(typeof(vm_operations), (string)table[key]); result[k] = v; } catch { continue; } } } return(result); }
internal void UpdateFromProxy(Proxy_VMSS proxy) { uuid = proxy.uuid == null ? null : proxy.uuid; name_label = proxy.name_label == null ? null : proxy.name_label; name_description = proxy.name_description == null ? null : proxy.name_description; enabled = (bool)proxy.enabled; type = proxy.type == null ? (vmss_type)0 : (vmss_type)Helper.EnumParseDefault(typeof(vmss_type), (string)proxy.type); retained_snapshots = proxy.retained_snapshots == null ? 0 : long.Parse(proxy.retained_snapshots); frequency = proxy.frequency == null ? (vmss_frequency)0 : (vmss_frequency)Helper.EnumParseDefault(typeof(vmss_frequency), (string)proxy.frequency); schedule = proxy.schedule == null ? null : Maps.convert_from_proxy_string_string(proxy.schedule); last_run_time = proxy.last_run_time; VMs = proxy.VMs == null ? null : XenRef <VM> .Create(proxy.VMs); }