src/packages/EmbedIO/Authentication/BasicAuthenticationModuleExtensions.cs
/// <summary>
/// Adds a user name and password to the <see cref="BasicAuthenticationModule.Accounts">Accounts</see> dictionary
/// of a <see cref="BasicAuthenticationModule"/>.
/// </summary>
/// <param name="this">The <see cref="BasicAuthenticationModule"/> on which this method is called.</param>
/// <param name="userName">The user name.</param>
/// <param name="password">The password.</param>
/// <returns><paramref name="this"/>, with the user name and password added to the
/// <see cref="BasicAuthenticationModule.Accounts">Accounts</see> dictionary.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException"><paramref name="userName"/> is <see langword="null"/>.</exception>
/// <exception cref="OverflowException">
/// <para>The <see cref="BasicAuthenticationModule.Accounts">Accounts</see> dictionary already contains
/// the maximum number of elements (<see cref="int.MaxValue">MaxValue</see>).</para>
/// </exception>
/// <remarks>
/// <para>If a <paramref name="userName"/> account already exists,
/// its password is replaced with <paramref name="password"/>.</para>
/// </remarks>
Adds a user name and password to the Accounts.
Adds a user name and password to the Accounts .
public static BasicAuthenticationModule WithAccount(this BasicAuthenticationModule @this, string userName, string password)
        {
            @this.Accounts.AddOrUpdate(userName, password, (_, __) => password);
            return @this;
        }
public static BasicAuthenticationModule WithAccount ( this BasicAuthenticationModule @this , string userName , string password ) { @this . Accounts . AddOrUpdate ( userName , password , ( _ , __ ) => password ) ; return @this ; }
Adds a user name and password to the Accounts.
Adds a user name and password to the Accounts .
, with the user name and password added to the
Accounts
with the user name and password added to the Accounts
None
None
None
BasicAuthenticationModule
this
userName
string
The user name.
The user name .
password
string
None
this
The  on which this method is called.
The on which this method is called .
remarks
If a  account already exists,
its password is replaced with .
If a account already exists its password is replaced with .