-
Notifications
You must be signed in to change notification settings - Fork 2
Create a new abstractions package #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
corstian
wants to merge
7
commits into
master
Choose a base branch
from
dev/abstractions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
91be8a7
Create a new abstractions package
corstian 41a3a99
Add the IMailDispatcher interface
corstian b1e744c
Make the solution build properly :)
corstian 82a46f1
Breaking change; register the MailDispatcher as IMailDispatcher with …
corstian 2d650e6
Resolve review issues
corstian c957673
Added another package config shared across projects, and a version bump
corstian fc4f7db
Added conditional references
synercoder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <PackageVersion>3.0.0-rc6</PackageVersion> | ||
| <VersionPrefix>0.0.1</VersionPrefix> | ||
| <VersionPrefix Condition="'$(packageversion)' != ''">$(PackageVersion)</VersionPrefix> | ||
| <VersionSuffix></VersionSuffix> | ||
| <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | ||
| <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
| <PackageTags>mail razor</PackageTags> | ||
| <Description>A library smoothing email generation from .NET code, by enforcing a strong boundary between the template, and code rendering the template.</Description> | ||
| <PackageProjectUrl>https://github.com/skyhop/Mail</PackageProjectUrl> | ||
| <RepositoryUrl>https://github.com/skyhop/Mail</RepositoryUrl> | ||
| <PackageReleaseNotes> | ||
| - Split the interfaces and base classes into different packages | ||
| </PackageReleaseNotes> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| using MimeKit; | ||
| using System; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace Skyhop.Mail.Abstractions | ||
| { | ||
| /// <summary> | ||
| /// Interface to a class used to generate and send emails | ||
| /// </summary> | ||
| public interface IMailDispatcher | ||
| { | ||
| /// <summary> | ||
| /// Sends the email | ||
| /// </summary> | ||
| /// <typeparam name="T">The type of the model carrying the payload of the mail.</typeparam> | ||
| /// <param name="data">The message payload</param> | ||
| /// <param name="to">The addresses to which the mail must be sent</param> | ||
| /// <param name="cc">The addresses to which the mail must be cc'ed.</param> | ||
| /// <param name="bcc">The addresses to which the mail must be bcc'ed.</param> | ||
| /// <param name="from">The addresses from which the mail is sent, can be null.</param> | ||
| /// <returns>An awaitable <seealso cref="Task"/> which represents this method call.</returns> | ||
| public Task SendMail<T>( | ||
| T data, | ||
| MailboxAddress[] to, | ||
| MailboxAddress[]? cc = default, | ||
| MailboxAddress[]? bcc = default, | ||
| MailboxAddress? from = default) where T : MailBase; | ||
|
|
||
| /// <summary> | ||
| /// Sends the email | ||
| /// </summary> | ||
| /// <typeparam name="T">The type of the model carrying the payload of the mail.</typeparam> | ||
| /// <param name="data">The message payload</param> | ||
| /// <param name="senderTransformation">An async action that can be used to set the different properties on the <seealso cref="IMessageSenderInfo"/>. The To and From properties must be set.</param> | ||
| /// <returns>An awaitable <seealso cref="Task"/> which represents this method call.</returns> | ||
| public Task SendMail<T>( | ||
| T data, Func<IMessageSenderInfo, Task> senderTransformation) | ||
| where T : MailBase; | ||
| } | ||
| } | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <Title>Skyhop.Mail.Abstractions</Title> | ||
| <Product>$(Title)</Product> | ||
| <PackageReleaseNotes> | ||
| - Split the interfaces and base classes into different packages | ||
| </PackageReleaseNotes> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
10 changes: 10 additions & 0 deletions
10
src/Skyhop.Mail.Abstractions/Skyhop.Mail.Abstractions.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <Import Project="$(MSBuildThisFileDirectory)\PackageDetails.props" /> | ||
| <Import Project="$(MSBuildThisFileDirectory)\..\PackageDetails.props" /> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="MimeKit" Version="2.10.1" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,11 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <PackageVersion>3.0.0-rc4</PackageVersion> | ||
| <VersionPrefix>0.0.1</VersionPrefix> | ||
| <VersionPrefix Condition="'$(packageversion)' != ''">$(PackageVersion)</VersionPrefix> | ||
| <VersionSuffix></VersionSuffix> | ||
| <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | ||
| <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
| <PackageTags>mail razor</PackageTags> | ||
| <Title>Skyhop.Mail</Title> | ||
| <Product>$(Title)</Product> | ||
| <Description>A library smoothing email generation from .NET code, by enforcing a strong boundary between the template, and code rendering the template.</Description> | ||
| <PackageProjectUrl>https://github.com/skyhop/Mail</PackageProjectUrl> | ||
| <RepositoryUrl>https://github.com/skyhop/Mail</RepositoryUrl> | ||
| <PackageReleaseNotes> | ||
| - Added transformations to edit the message content and senderinfo | ||
| - Split the interfaces and base classes into different packages | ||
| </PackageReleaseNotes> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,24 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <Import Project="$(MSBuildThisFileDirectory)\PackageDetails.props" /> | ||
| <Import Project="$(MSBuildThisFileDirectory)\..\PackageDetails.props" /> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="HtmlAgilityPack" Version="1.11.17" /> | ||
| <PackageReference Include="MailKit" Version="2.4.1" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" /> | ||
| <PackageReference Include="PreMailer.Net" Version="2.1.3" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'"> | ||
| <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'net5.0'"> | ||
| <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.3" /> | ||
| </ItemGroup> | ||
synercoder marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\Skyhop.Mail.Abstractions\Skyhop.Mail.Abstractions.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.