public IActionResult EmailLayout() { var themes = EnumX.AllValues <Theme>(); var languages = PlainText.AcceptedLanguages(); var fakeUsers = from language in languages from theme in themes select fakeUser(language, theme); var result = from fakeUser in fakeUsers select getLayout(Format.MoveNotification(fakeUser)) + getLayout(Format.SecurityAction(fakeUser, SecurityAction.PasswordReset)) + getLayout(Format.SecurityAction(fakeUser, SecurityAction.UserVerification)) + getLayout(Format.UserRemoval(fakeUser, RemovalReason.NoInteraction)) + getLayout(Format.UserRemoval(fakeUser, RemovalReason.NotSignedContract)) + getLayout(Format.WipeNotice(fakeUser, RemovalReason.NoInteraction)) + getLayout(Format.WipeNotice(fakeUser, RemovalReason.NotSignedContract)) + getLayout(Format.WipeNotice(fakeUser, RemovalReason.PersonAsked)) ; return(View(result)); }
private static IDictionary <String, EmailType> chargeTypes() { var types = new Dictionary <String, EmailType> { { EmailType.MoveNotification.ToString(), EmailType.MoveNotification }, }; EnumX.AllExcept(SecurityAction.UnsubscribeMoveMail) .ForEach( sa => types.Add(sa.ToString(), EmailType.SecurityAction) ); EnumX.AllValues <RemovalReason>() .ForEach( rr => types.Add(rr.ToString(), EmailType.RemovalReason) ); types.Add( EmailType.WipeNotice.ToString(), EmailType.WipeNotice ); var langs = PlainText.AcceptedLanguages(); var keys = types.Keys.ToList(); foreach (var key in keys) { var value = types[key]; types.Remove(key); foreach (var lang in langs) { var newKey = PlainText.Email[key, lang, "Subject"]; types.Add(newKey, value); } } return(types); }
public void GivenIHaveTheseThemes() { themes = EnumX.AllValues <Theme>(); }
public void GivenIHaveTheseEmailTypes() { emailTypes = EnumX.AllValues <EmailType>(); }