Exemple #1
0
        public static string StringOf(this cluster_operation x)
        {
            switch (x)
            {
            case cluster_operation.add:
                return("add");

            case cluster_operation.remove:
                return("remove");

            case cluster_operation.enable:
                return("enable");

            case cluster_operation.disable:
                return("disable");

            case cluster_operation.destroy:
                return("destroy");

            default:
                return("unknown");
            }
        }
Exemple #2
0
        internal static Dictionary <string, cluster_operation> convert_from_proxy_string_cluster_operation(Object o)
        {
            Hashtable table = (Hashtable)o;
            Dictionary <string, cluster_operation> result = new Dictionary <string, cluster_operation>();

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