public INewUserWithTemporaryPasswordTemplateBuilderContext CreateNewUserWithTemporaryPasswordContext(UserSummary user, string temporaryPassword) { var context = new NewUserWithTemporaryPasswordTemplateBuilderContext() { User = user, TemporaryPassword = new HtmlString(temporaryPassword), DefaultTemplateFactory = NewUserWithTemporaryPasswordTemplateFactory }; return(context); }
private async Task <NewUserWithTemporaryPasswordMailTemplate> NewUserWithTemporaryPasswordTemplateFactory(NewUserWithTemporaryPasswordTemplateBuilderContext context) { var template = new NewUserWithTemporaryPasswordMailTemplate(); template.TemporaryPassword = context.TemporaryPassword; await _userMailTemplateInitializer.Initialize(context.User, template); return(template); }