• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UserAccountService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UserAccountService的典型用法代码示例。如果您正苦于以下问题:C# UserAccountService类的具体用法?C# UserAccountService怎么用?C# UserAccountService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UserAccountService类属于命名空间,在下文中一共展示了UserAccountService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OwinAuthenticationService

 public OwinAuthenticationService(
     UserAccountService svc,
     IDictionary<string, object> env
 )
     : this(MembershipRebootOwinConstants.AuthenticationType, svc, env, null)
 {
 }
开发者ID:brockallen,项目名称:BrockAllen.MembershipReboot,代码行数:7,代码来源:OwinAuthenticationService.cs


示例2: CallsDisposeOnUserRepo

 public void CallsDisposeOnUserRepo()
 {
     var userAccountRepo = new Mock<IUserAccountRepository>();
     var sub = new UserAccountService(userAccountRepo.Object, null, null);
     sub.Dispose();
     userAccountRepo.Verify(x => x.Dispose());
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:7,代码来源:UserAccountServiceTests.cs


示例3: LoginController

 public LoginController(
     UserAccountService userService, 
     AuthenticationService authSvc)
 {
     this.userAccountService = userService;
     this.authSvc = authSvc;
 }
开发者ID:paulute,项目名称:BrockAllen.MembershipReboot,代码行数:7,代码来源:LoginController.cs


示例4: CallsSaveChangesOnRepository

 public void CallsSaveChangesOnRepository()
 {
     var repo = new Mock<IUserAccountRepository>();
     var sub = new UserAccountService(repo.Object, null, null);
     sub.SaveChanges();
     repo.Verify(x => x.SaveChanges());
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:7,代码来源:UserAccountServiceTests.cs


示例5: OwinAuthenticationService

 public OwinAuthenticationService(
     UserAccountService svc,
     IDictionary<string, object> environment
 )
     : this(svc, environment, null)
 {
 }
开发者ID:neogodless,项目名称:BrockAllen.MembershipReboot,代码行数:7,代码来源:OwinAuthenticationService.cs


示例6: Init

 public void Init()
 {
     securitySettings = new SecuritySettings();
     securitySettings.PasswordHashingIterationCount = 1; // tests will run faster
     configuration = new MembershipRebootConfiguration(securitySettings);
     repository = new FakeUserAccountRepository(); 
     subject = new UserAccountService(configuration, repository);
 }
开发者ID:nmsampaio,项目名称:BrockAllen.MembershipReboot,代码行数:8,代码来源:UserAccountServiceTests.cs


示例7: CallsUpdateOnRepository

 public void CallsUpdateOnRepository()
 {
     var repo = new Mock<IUserAccountRepository>();
     var sub = new UserAccountService(repo.Object, null, null);
     var ua = new UserAccount();
     sub.Update(ua);
     repo.Verify(x => x.Update(ua));
 }
开发者ID:kijanawoodard,项目名称:BrockAllen.MembershipReboot,代码行数:8,代码来源:UserAccountServiceTests.cs


示例8: Validate

 public ValidationResult Validate(UserAccountService service, UserAccount account, string value)
 {
     if (value.Length < 4)
     {
         return new ValidationResult("Password must be at least 4 characters long");
     }
     
     return null;
 }
开发者ID:paulute,项目名称:BrockAllen.MembershipReboot,代码行数:9,代码来源:MembershipRebootConfiguration.cs


示例9: InitDatabase

 private void InitDatabase()
 {
     var svc = new UserAccountService(new DefaultUserAccountRepository(SecuritySettings.Instance.ConnectionStringName), null, null);
     if (svc.GetByUsername("admin") == null)
     {
         var account = svc.CreateAccount("admin", "admin123", "[email protected]");
         svc.VerifyAccount(account.VerificationKey);
         account.AddClaim(ClaimTypes.Role, "Administrator");
         svc.Update(account);
     }
 }
开发者ID:paulute,项目名称:BrockAllen.MembershipReboot,代码行数:11,代码来源:Global.asax.cs


示例10: btRegister_Click

 protected void btRegister_Click(object sender, EventArgs e)
 {
     UserAccountService uas = new UserAccountService();
     if (uas.UserExists(txtUserName.Text) || txtPassword.Text != txtConfirm.Text)
         lblResult.Text = "UserName already exists or Password Mistach";
     else
     {
         uas.CreateAccount(txtUserName.Text, txtPassword.Text);
         Response.Redirect("Login.aspx");
     }
 }
开发者ID:romaan,项目名称:uq-itee-assignment,代码行数:11,代码来源:Register.aspx.cs


示例11: InitDatabase

 private void InitDatabase()
 {
     var svc = new UserAccountService(new EFUserAccountRepository(), null, null);
     if (svc.GetByUsername("admin") == null)
     {
         var account = svc.CreateAccount("admin", "admin123", "[email protected]");
         svc.VerifyAccount(account.VerificationKey);
         account.AddClaim(ClaimTypes.Role, "Administrator");
         svc.Update(account);
     }
 }
开发者ID:keizof,项目名称:BrockAllen.MembershipReboot,代码行数:11,代码来源:Global.asax.cs


示例12: Init

        public void Init()
        {
            oldIterations = SecuritySettings.Instance.PasswordHashingIterationCount;
            SecuritySettings.Instance.PasswordHashingIterationCount = 1; // tests will run faster

            configuration = new MembershipRebootConfiguration();
            key = new KeyNotification();
            configuration.AddEventHandler(key);
            repository = new FakeUserAccountRepository();
            userAccountService = new UserAccountService(configuration, repository);

            subject = new TestAuthenticationService(userAccountService);
        }
开发者ID:Ranhiru,项目名称:BrockAllen.MembershipReboot,代码行数:13,代码来源:AuthenticationServiceTests.cs


示例13: PasswordResetController

 public PasswordResetController(UserAccountService userAccountService)
 {
     this.userAccountService = userAccountService;
 }
开发者ID:jdiamond,项目名称:BrockAllen.MembershipReboot,代码行数:4,代码来源:PasswordResetController.cs


示例14: CloseAccountController

 public CloseAccountController(UserAccountService userAccountService)
 {
     this.userAccountService = userAccountService;
 }
开发者ID:simongh,项目名称:BrockAllen.MembershipReboot,代码行数:4,代码来源:CloseAccountController.cs


示例15: LinkedAccountController

 public LinkedAccountController(
     AuthenticationService AuthenticationService)
 {
     this.authenticationService = AuthenticationService;
     this.userAccountService = AuthenticationService.UserAccountService;
 }
开发者ID:keithharvey,项目名称:BrockAllen.MembershipReboot,代码行数:6,代码来源:LinkedAccountController.cs


示例16: ChangeSecretQuestionController

 public ChangeSecretQuestionController(UserAccountService userAccountService)
 {
     this.userAccountService = userAccountService;
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:4,代码来源:ChangeSecretQuestionController.cs


示例17: ChangeUsernameController

 public ChangeUsernameController(
     UserAccountService<CustomUserAccount> userAccountService, AuthenticationService<CustomUserAccount> authSvc)
 {
     this.userAccountService = userAccountService;
     this.authSvc = authSvc;
 }
开发者ID:KeithBarrows,项目名称:BrockAllen.MembershipReboot,代码行数:6,代码来源:ChangeUsernameController.cs


示例18: NullUserAccountRepo_Throws

 public void NullUserAccountRepo_Throws()
 {
     var sub = new UserAccountService(null, null, null);
 }
开发者ID:rodmjay,项目名称:BrockAllen.MembershipReboot,代码行数:4,代码来源:UserAccountServiceTests.cs


示例19: ChangeSecretQuestionController

 public ChangeSecretQuestionController(UserAccountService<HierarchicalUserAccount> userAccountService)
 {
     this.userAccountService = userAccountService;
 }
开发者ID:KamoHaladus,项目名称:BrockAllen.MembershipReboot,代码行数:4,代码来源:ChangeSecretQuestionController.cs


示例20: HomeController

 public HomeController(IUserAccountQuery query, UserAccountService<CustomUserAccount> userAccountService)
 {
     this.userAccountService = userAccountService;
     this.query = query;
 }
开发者ID:nothingmn,项目名称:BrockAllen.MembershipReboot,代码行数:5,代码来源:HomeController.cs



注:本文中的UserAccountService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UserAction类代码示例发布时间:2022-05-24
下一篇:
C# UserAccount类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap