public static LdapConnectorType FromValue(string value)
 {
     foreach (LdapConnectorType ldapConnectorType in LdapConnectorType.Values())
     {
         if (ldapConnectorType.Value().Equals(value))
         {
             return(ldapConnectorType);
         }
     }
     throw new ArgumentException(value.ToString());
 }
        public static List <LdapConnectorType> Values()
        {
            LdapConnectorType        ldapConnectorType     = new LdapConnectorType();
            List <LdapConnectorType> ldapConnectorTypeList = new List <LdapConnectorType>();

            foreach (FieldInfo field in ldapConnectorType.GetType().GetFields())
            {
                ldapConnectorTypeList.Add((LdapConnectorType)field.GetValue((object)ldapConnectorType));
            }
            return(ldapConnectorTypeList);
        }