/// <summary> /// Sets the user aAuthenticator factory. /// </summary> /// <param name="value">The user authenticator factory.</param> /// <returns>A OptionsBuilder to continue building on.</returns> public SmtpServerOptionsBuilder UserAuthenticator(IUserAuthenticatorFactory value) { _setters.Add(options => options.UserAuthenticatorFactory = value ?? DoNothingUserAuthenticator.Instance); return(this); }
/// <summary> /// Add an instance of the user authenticator. /// </summary> /// <param name="userAuthenticator">The user authenticator.</param> public void Add(IUserAuthenticator userAuthenticator) { _userAuthenticatorFactory = new DelegatingUserAuthenticatorFactory(context => userAuthenticator); }
/// <summary> /// Sets the user aAuthenticator factory. /// </summary> /// <param name="userAuthenticatorFactory">The user authenticator factory.</param> /// <returns>A OptionsBuilder to continue building on.</returns> public OptionsBuilder UserAuthenticator(IUserAuthenticatorFactory userAuthenticatorFactory) { _options.UserAuthenticatorFactory = userAuthenticatorFactory; return(this); }
/// <summary> /// Add an instance of the user authenticator factory. /// </summary> /// <param name="userAuthenticatorFactory">The user authenticator factory.</param> public void Add(IUserAuthenticatorFactory userAuthenticatorFactory) { _userAuthenticatorFactory = userAuthenticatorFactory; }