public static string StringOf(this host_allowed_operations x) { switch (x) { case host_allowed_operations.provision: return("provision"); case host_allowed_operations.evacuate: return("evacuate"); case host_allowed_operations.shutdown: return("shutdown"); case host_allowed_operations.reboot: return("reboot"); case host_allowed_operations.power_on: return("power_on"); case host_allowed_operations.vm_start: return("vm_start"); case host_allowed_operations.vm_resume: return("vm_resume"); case host_allowed_operations.vm_migrate: return("vm_migrate"); default: return("unknown"); } }
internal static Dictionary <string, host_allowed_operations> convert_from_proxy_string_host_allowed_operations(object o) { Hashtable hashtable = (Hashtable)o; Dictionary <string, host_allowed_operations> dictionary = new Dictionary <string, host_allowed_operations>(); if (hashtable != null) { foreach (string str in hashtable.Keys) { try { string str2 = str; host_allowed_operations _operations = (hashtable[str] == null) ? host_allowed_operations.provision : ((host_allowed_operations)Helper.EnumParseDefault(typeof(host_allowed_operations), (string)hashtable[str])); dictionary[str2] = _operations; } catch { } } } return(dictionary); }
convert_from_proxy_string_host_allowed_operations(Object o) { Hashtable table = (Hashtable)o; Dictionary <string, host_allowed_operations> result = new Dictionary <string, host_allowed_operations>(); if (table != null) { foreach (string key in table.Keys) { try { string k = key; host_allowed_operations v = table[key] == null ? (host_allowed_operations)0 : (host_allowed_operations)Helper.EnumParseDefault(typeof(host_allowed_operations), (string)table[key]); result[k] = v; } catch { continue; } } } return(result); }
public static string ToString(host_allowed_operations x) { switch (x) { case host_allowed_operations.provision: return "provision"; case host_allowed_operations.evacuate: return "evacuate"; case host_allowed_operations.shutdown: return "shutdown"; case host_allowed_operations.reboot: return "reboot"; case host_allowed_operations.power_on: return "power_on"; case host_allowed_operations.vm_start: return "vm_start"; case host_allowed_operations.vm_resume: return "vm_resume"; case host_allowed_operations.vm_migrate: return "vm_migrate"; default: return "unknown"; } }
public static string ToString(host_allowed_operations x) { return(x.StringOf()); }