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");
        }
示例#3
0
        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");
            }
        }
示例#4
0
        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);
        }
示例#5
0
文件: Maps.cs 项目: hl10502/XenCenter
        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);
        }
示例#6
0
 public static string ToString(vm_appliance_operation x)
 {
     return(x.StringOf());
 }