Пример #1
0
        public static List <LdapAuthenticationMechanismType> Values()
        {
            LdapAuthenticationMechanismType        authenticationMechanismType     = new LdapAuthenticationMechanismType();
            List <LdapAuthenticationMechanismType> authenticationMechanismTypeList = new List <LdapAuthenticationMechanismType>();

            foreach (FieldInfo field in authenticationMechanismType.GetType().GetFields())
            {
                authenticationMechanismTypeList.Add((LdapAuthenticationMechanismType)field.GetValue((object)authenticationMechanismType));
            }
            return(authenticationMechanismTypeList);
        }
Пример #2
0
 public static LdapAuthenticationMechanismType FromValue(
     string value)
 {
     foreach (LdapAuthenticationMechanismType authenticationMechanismType in LdapAuthenticationMechanismType.Values())
     {
         if (authenticationMechanismType.Value().Equals(value))
         {
             return(authenticationMechanismType);
         }
     }
     throw new ArgumentException(value.ToString());
 }