Esempio n. 1
0
 public static string ToString(pool_allowed_operations x)
 {
     switch (x)
     {
         case pool_allowed_operations.ha_enable:
             return "ha_enable";
         case pool_allowed_operations.ha_disable:
             return "ha_disable";
         default:
             return "unknown";
     }
 }
        public static string ToString(pool_allowed_operations x)
        {
            switch (x)
            {
            case pool_allowed_operations.ha_enable:
                return("ha_enable");

            case pool_allowed_operations.ha_disable:
                return("ha_disable");
            }
            return("unknown");
        }
Esempio n. 3
0
        public static string StringOf(this pool_allowed_operations x)
        {
            switch (x)
            {
            case pool_allowed_operations.ha_enable:
                return("ha_enable");

            case pool_allowed_operations.ha_disable:
                return("ha_disable");

            case pool_allowed_operations.cluster_create:
                return("cluster_create");

            default:
                return("unknown");
            }
        }
Esempio n. 4
0
        internal static Dictionary <string, pool_allowed_operations> convert_from_proxy_string_pool_allowed_operations(object o)
        {
            Hashtable hashtable = (Hashtable)o;
            Dictionary <string, pool_allowed_operations> dictionary = new Dictionary <string, pool_allowed_operations>();

            if (hashtable != null)
            {
                foreach (string str in hashtable.Keys)
                {
                    try
                    {
                        string str2 = str;
                        pool_allowed_operations _operations = (hashtable[str] == null) ? pool_allowed_operations.ha_enable : ((pool_allowed_operations)Helper.EnumParseDefault(typeof(pool_allowed_operations), (string)hashtable[str]));
                        dictionary[str2] = _operations;
                    }
                    catch
                    {
                    }
                }
            }
            return(dictionary);
        }
Esempio n. 5
0
        convert_from_proxy_string_pool_allowed_operations(Object o)
        {
            Hashtable table = (Hashtable)o;
            Dictionary <string, pool_allowed_operations> result = new Dictionary <string, pool_allowed_operations>();

            if (table != null)
            {
                foreach (string key in table.Keys)
                {
                    try
                    {
                        string k = key;
                        pool_allowed_operations v = table[key] == null ? (pool_allowed_operations)0 : (pool_allowed_operations)Helper.EnumParseDefault(typeof(pool_allowed_operations), (string)table[key]);
                        result[k] = v;
                    }
                    catch
                    {
                        continue;
                    }
                }
            }
            return(result);
        }
Esempio n. 6
0
 public static string ToString(pool_allowed_operations x)
 {
     return(x.StringOf());
 }