public DSMAuthentication GetOrAddAuthenticationMethod(DSMAuthenticationMethod method) { DSMAuthentication am = AuthenticationSection.TryGet(method); if (am == null) { am = new DSMAuthentication(method); AuthenticationSection.Add(am); } return(am); }
public DSMAuthentication GetOrAddAuthenticationMethod(DSMAuthenticationMethod method) { if (AuthenticationSection.ContainsKey(method)) { return(AuthenticationSection[method]); } else { var added = new DSMAuthentication(method); AuthenticationSection.Add(added); return(added); } }