public void RemoveAuthenticationMethod(DSMAuthenticationMethod method)
 {
     if (AuthenticationSection.ContainsKey(method))
     {
         AuthenticationSection.Remove(AuthenticationSection[method]);
     }
 }
Exemple #2
0
 public DSMAuthentication UpdateAuthenticationMethod(DSMAuthenticationMethod method, bool add)
 {
     if (!add)
     {
         RemoveAuthenticationMethod(method);
     }
     return(add ? GetOrAddAuthenticationMethod(method) : null);
 }
Exemple #3
0
        public void RemoveAuthenticationMethod(DSMAuthenticationMethod method)
        {
            DSMAuthentication am = AuthenticationSection.TryGet(method);

            if (am != null)
            {
                AuthenticationSection.Remove(am);
            }
        }
Exemple #4
0
        public DSMAuthentication GetOrAddAuthenticationMethod(DSMAuthenticationMethod method)
        {
            DSMAuthentication am = AuthenticationSection.TryGet(method);

            if (am == null)
            {
                am = new DSMAuthentication(method);
                AuthenticationSection.Add(am);
            }
            return(am);
        }
 public DSMAuthentication GetAuthenticationMethod(DSMAuthenticationMethod method)
 {
     if (AuthenticationSection.ContainsKey(method))
     {
         return(AuthenticationSection[method]);
     }
     else
     {
         return(null);
     }
 }
 public DSMAuthentication GetOrAddAuthenticationMethod(DSMAuthenticationMethod method)
 {
     if (AuthenticationSection.ContainsKey(method))
     {
         return(AuthenticationSection[method]);
     }
     else
     {
         var added = new DSMAuthentication(method);
         AuthenticationSection.Add(added);
         return(added);
     }
 }
Exemple #7
0
 public bool HasAuthenticationMethod(DSMAuthenticationMethod method)
 {
     return(AuthenticationSection.ContainsKey(method));
 }
Exemple #8
0
 public DSMAuthentication GetAuthenticationMethod(DSMAuthenticationMethod method)
 {
     return(AuthenticationSection.TryGet(method));
 }
Exemple #9
0
 public DSMAuthentication(DSMAuthenticationMethod method)
     : this()
 {
     Method = method;
 }