Skip to content

Commit e4d66f8

Browse files
Remove the base class EmailModel.
1 parent d719a0f commit e4d66f8

23 files changed

+19
-53
lines changed

src/Emailing.Templates.Razor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Example model used by the templates:
4343
```csharp
4444
using PosInformatique.Foundations.Emailing;
4545

46-
public sealed class InvitationEmailTemplateModel : EmailModel
46+
public sealed class InvitationEmailTemplateModel
4747
{
4848
public string FirstName { get; set; } = string.Empty;
4949
public string InvitationLink { get; set; } = string.Empty;

src/Emailing.Templates.Razor/RazorEmailTemplate.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace PosInformatique.Foundations.Emailing.Templates.Razor
1313
/// </summary>
1414
/// <typeparam name="TModel">Type of the model used to generate the subject and body of the e-mail.</typeparam>
1515
public static class RazorEmailTemplate<TModel>
16-
where TModel : EmailModel
1716
{
1817
/// <summary>
1918
/// Creates an <see cref="EmailTemplate{TModel}"/> using the specified Razor components as text templating for the subject and body.

src/Emailing.Templates.Razor/RazorEmailTemplateBody.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace PosInformatique.Foundations.Emailing.Templates.Razor
1313
/// </summary>
1414
/// <typeparam name="TModel">Type of the <see cref="Model"/> used to generate the body of the e-mail.</typeparam>
1515
public abstract class RazorEmailTemplateBody<TModel> : ComponentBase
16-
where TModel : EmailModel
1716
{
1817
/// <summary>
1918
/// Initializes a new instance of the <see cref="RazorEmailTemplateBody{TModel}"/> class.

src/Emailing.Templates.Razor/RazorEmailTemplateSubject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace PosInformatique.Foundations.Emailing.Templates.Razor
1313
/// </summary>
1414
/// <typeparam name="TModel">Type of the <see cref="Model"/> used to generate the subject of the e-mail.</typeparam>
1515
public abstract class RazorEmailTemplateSubject<TModel> : ComponentBase
16-
where TModel : EmailModel
1716
{
1817
/// <summary>
1918
/// Initializes a new instance of the <see cref="RazorEmailTemplateSubject{TModel}"/> class.

src/Emailing/Email.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace PosInformatique.Foundations.Emailing
1111
/// </summary>
1212
/// <typeparam name="TModel">Type of data model injected to the <see cref="Template"/> to generate the e-mail.</typeparam>
1313
public sealed class Email<TModel>
14-
where TModel : EmailModel
1514
{
1615
/// <summary>
1716
/// Initializes a new instance of the <see cref="Email{TModel}"/> class

src/Emailing/EmailManager.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public EmailManager(IOptions<EmailingOptions> options, IEmailProvider provider,
3030
}
3131

3232
public Email<TModel> Create<TModel>(EmailTemplateIdentifier<TModel> identifier)
33-
where TModel : EmailModel
3433
{
3534
ArgumentNullException.ThrowIfNull(identifier);
3635

@@ -45,7 +44,6 @@ public Email<TModel> Create<TModel>(EmailTemplateIdentifier<TModel> identifier)
4544
}
4645

4746
public async Task SendAsync<TModel>(Email<TModel> email, CancellationToken cancellationToken = default)
48-
where TModel : EmailModel
4947
{
5048
ArgumentNullException.ThrowIfNull(email);
5149

src/Emailing/EmailModel.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/Emailing/EmailRecipientCollection.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ namespace PosInformatique.Foundations.Emailing
1414
/// </summary>
1515
/// <typeparam name="TModel">Data model injected to the <see cref="EmailTemplate{TModel}"/> to generate the e-mail for each recipient.</typeparam>
1616
public class EmailRecipientCollection<TModel> : Collection<EmailRecipient<TModel>>
17-
where TModel : EmailModel
1817
{
1918
/// <summary>
2019
/// Creates and add new <see cref="EmailRecipient{TModel}"/> in the <see cref="EmailRecipientCollection{TModel}"/>.

src/Emailing/EmailTemplate.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace PosInformatique.Foundations.Emailing
1313
/// </summary>
1414
/// <typeparam name="TModel">Type of data model injected to the <see cref="Subject"/> and <see cref="HtmlBody"/> to generate the e-mail.</typeparam>
1515
public class EmailTemplate<TModel>
16-
where TModel : EmailModel
1716
{
1817
/// <summary>
1918
/// Initializes a new instance of the <see cref="EmailTemplate{TModel}"/> class.

src/Emailing/EmailTemplateIdentifier.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace PosInformatique.Foundations.Emailing
1111
/// </summary>
1212
/// <typeparam name="TModel">Data model injected to the <see cref="EmailTemplate{TModel}"/> to generate the e-mail.</typeparam>
1313
public sealed class EmailTemplateIdentifier<TModel>
14-
where TModel : EmailModel
1514
{
1615
private EmailTemplateIdentifier()
1716
{

0 commit comments

Comments
 (0)