public static string ToString(vm_appliance_operation x) { switch (x) { case vm_appliance_operation.start: return "start"; case vm_appliance_operation.clean_shutdown: return "clean_shutdown"; case vm_appliance_operation.hard_shutdown: return "hard_shutdown"; case vm_appliance_operation.shutdown: return "shutdown"; default: return "unknown"; } }
public static string ToString(vm_appliance_operation x) { switch (x) { case vm_appliance_operation.start: return("start"); case vm_appliance_operation.clean_shutdown: return("clean_shutdown"); case vm_appliance_operation.hard_shutdown: return("hard_shutdown"); case vm_appliance_operation.shutdown: return("shutdown"); } return("unknown"); }
public static string StringOf(this vm_appliance_operation x) { switch (x) { case vm_appliance_operation.start: return("start"); case vm_appliance_operation.clean_shutdown: return("clean_shutdown"); case vm_appliance_operation.hard_shutdown: return("hard_shutdown"); case vm_appliance_operation.shutdown: return("shutdown"); default: return("unknown"); } }
internal static Dictionary <string, vm_appliance_operation> convert_from_proxy_string_vm_appliance_operation(object o) { Hashtable hashtable = (Hashtable)o; Dictionary <string, vm_appliance_operation> dictionary = new Dictionary <string, vm_appliance_operation>(); if (hashtable != null) { foreach (string str in hashtable.Keys) { try { string str2 = str; vm_appliance_operation _operation = (hashtable[str] == null) ? vm_appliance_operation.start : ((vm_appliance_operation)Helper.EnumParseDefault(typeof(vm_appliance_operation), (string)hashtable[str])); dictionary[str2] = _operation; } catch { } } } return(dictionary); }
convert_from_proxy_string_vm_appliance_operation(Object o) { Hashtable table = (Hashtable)o; Dictionary <string, vm_appliance_operation> result = new Dictionary <string, vm_appliance_operation>(); if (table != null) { foreach (string key in table.Keys) { try { string k = key; vm_appliance_operation v = table[key] == null ? (vm_appliance_operation)0 : (vm_appliance_operation)Helper.EnumParseDefault(typeof(vm_appliance_operation), (string)table[key]); result[k] = v; } catch { continue; } } } return(result); }
public static string ToString(vm_appliance_operation x) { return(x.StringOf()); }