示例#1
0
        public static async Task MainAsync(string[] args)
        {
            VoatUserManager userManager = new VoatUserManager();
            SignInManager <VoatIdentityUser> signInManager = null;

            AccountController accountController;

            accountController = new AccountController(userManager, signInManager);

            Task <ActionResult> asyncVal1;

            asyncVal1 = accountController.ToggleNightMode();

            Task <JsonResult> asyncVal2;

            asyncVal2 = accountController.CheckUsernameAvailability();

            ActionResult val1;

            val1 = await asyncVal1;

            JsonResult val2;

            val2 = await asyncVal2;
        }
示例#2
0
        public AccountController(
            VoatUserManager userManager,
            SignInManager <VoatIdentityUser> signInManager
            )
        {
            _userManager   = userManager;
            _signInManager = signInManager;

            UserManager = _userManager;
        }