using System; namespace EmbedIO.Authentication { /// /// Provides extension methods for . /// public static class BasicAuthenticationModuleExtensions { /// /// Adds a username and password to the Accounts dictionary. /// /// The on which this method is called. /// The user name. /// The password. /// , with the user name and password added. /// is . /// is . /// /// The Accounts dictionary already contains /// the maximum number of elements (MaxValue). /// /// /// If a account already exists, /// its password is replaced with . /// public static BasicAuthenticationModule WithAccount(this BasicAuthenticationModule @this, string userName, string password) { @this.Accounts.AddOrUpdate(userName, password, (_, __) => password); return @this; } } }