コード例 #1
0
        private void InitializeLogins()
        {
            var adminAccount = new AccountModel {UserId = "Admin", Administrator = true};
            var shopperAccount = new AccountModel { UserId = "Guest", Administrator = false };

            AddLogin(adminAccount, "Admin!2");
            AddLogin(shopperAccount, "Guest!2");
        }
コード例 #2
0
 private void AddLogin(AccountModel account, string password)
 {
     _accounts.Add(account.UserId, account);
     _logins.Add(GenerateSha2PasswordHash(account.UserId, password));
 }