Ejemplo n.º 1
0
        public static AuthServerConfigResourceType ToResourceTypeFromString(this String type)
        {
            AuthServerConfigResourceType output = AuthServerConfigResourceType.OpenId;

            if (!Enum.TryParse(type, out output))
            {
                throw new Exception(type + " is not a valid AuthServerConfigResourceType");
            }

            return(output);
        }
Ejemplo n.º 2
0
 public static String ToStringFromResourceType(this AuthServerConfigResourceType type)
 {
     return(Enum.GetName(typeof(AuthServerConfigResourceType), type));
 }