Skip to content
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

Common abstractions #91

Merged
merged 2 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 62 additions & 30 deletions Proffer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage", "src\Proffer.Storage\Proffer.Storage.csproj", "{0CA36021-3FA3-4688-8D61-A2B8A0FB168C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.Azure", "src\Proffer.Storage.Azure\Proffer.Storage.Azure.csproj", "{D2422F9C-B64F-47B9-AFFF-EC7899AA956D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.FileSystem", "src\Proffer.Storage.FileSystem\Proffer.Storage.FileSystem.csproj", "{F53D7921-7828-4AF6-BE1E-DB81E80A65CC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.FileSystem.Properties.Json", "src\Proffer.Storage.FileSystem.Properties.Json\Proffer.Storage.FileSystem.Properties.Json.csproj", "{E72BC0D9-6BD2-4D8D-8A59-ABB2815B1E85}"
Expand All @@ -57,8 +55,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{EB0DAEC2
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Testing", "tests\Proffer.Testing\Proffer.Testing.csproj", "{815899B8-C129-469A-B169-2A59E65181F1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.Azure.Tests", "tests\Proffer.Storage.Azure.Tests\Proffer.Storage.Azure.Tests.csproj", "{E41AF4E2-9692-4BF2-BDBB-3F36A2135ADB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Email.SendGrid.Tests", "tests\Proffer.Email.SendGrid.Tests\Proffer.Email.SendGrid.Tests.csproj", "{A1BABC33-523C-419B-8407-67A3BCE53737}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.Tests", "tests\Proffer.Storage.Tests\Proffer.Storage.Tests.csproj", "{1BBECE5A-7008-4D23-9DC6-FEC42AB57D85}"
Expand All @@ -69,6 +65,26 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.FileSystem.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.FileSystem.Server.Tests", "tests\Proffer.Storage.FileSystem.Server.Tests\Proffer.Storage.FileSystem.Server.Tests.csproj", "{FDA33857-554F-4616-A674-06417AD6A0AF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.Azure.Blobs", "src\Proffer.Storage.Azure.Blobs\Proffer.Storage.Azure.Blobs.csproj", "{E0015649-ADB8-4D25-A14E-B2D5D3AD633F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Storage.Azure.Blobs.Tests", "tests\Proffer.Storage.Azure.Blobs.Tests\Proffer.Storage.Azure.Blobs.Tests.csproj", "{FE0568DD-0D79-4A87-B67D-751E8880F909}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Azure", "src\Proffer.Azure\Proffer.Azure.csproj", "{25BE0184-A4E6-4373-9096-A9ACE46C6553}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proffer", "src\Proffer\Proffer.csproj", "{61E7D303-3E52-43CF-B873-DD210A701E0C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Email", "Email", "{BF1523C2-6954-4994-974E-E77F3ACE8398}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Storage", "Storage", "{278FD0BB-B382-455E-806F-32680299995D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templating", "Templating", "{93D47517-5E43-4E32-B64D-561D5BED4CE7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Email", "Email", "{9DF1EED6-5002-428F-8834-77D201C679DD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Storage", "Storage", "{CF4CBCB2-36F4-4D49-AC79-062FB7DDF878}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templating", "Templating", "{6B4C6C7C-189A-42B4-8860-90652BDCC6B1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -79,10 +95,6 @@ Global
{0CA36021-3FA3-4688-8D61-A2B8A0FB168C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CA36021-3FA3-4688-8D61-A2B8A0FB168C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CA36021-3FA3-4688-8D61-A2B8A0FB168C}.Release|Any CPU.Build.0 = Release|Any CPU
{D2422F9C-B64F-47B9-AFFF-EC7899AA956D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2422F9C-B64F-47B9-AFFF-EC7899AA956D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2422F9C-B64F-47B9-AFFF-EC7899AA956D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2422F9C-B64F-47B9-AFFF-EC7899AA956D}.Release|Any CPU.Build.0 = Release|Any CPU
{F53D7921-7828-4AF6-BE1E-DB81E80A65CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F53D7921-7828-4AF6-BE1E-DB81E80A65CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F53D7921-7828-4AF6-BE1E-DB81E80A65CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -127,10 +139,6 @@ Global
{815899B8-C129-469A-B169-2A59E65181F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{815899B8-C129-469A-B169-2A59E65181F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{815899B8-C129-469A-B169-2A59E65181F1}.Release|Any CPU.Build.0 = Release|Any CPU
{E41AF4E2-9692-4BF2-BDBB-3F36A2135ADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E41AF4E2-9692-4BF2-BDBB-3F36A2135ADB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E41AF4E2-9692-4BF2-BDBB-3F36A2135ADB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E41AF4E2-9692-4BF2-BDBB-3F36A2135ADB}.Release|Any CPU.Build.0 = Release|Any CPU
{A1BABC33-523C-419B-8407-67A3BCE53737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1BABC33-523C-419B-8407-67A3BCE53737}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1BABC33-523C-419B-8407-67A3BCE53737}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -151,31 +159,55 @@ Global
{FDA33857-554F-4616-A674-06417AD6A0AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDA33857-554F-4616-A674-06417AD6A0AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDA33857-554F-4616-A674-06417AD6A0AF}.Release|Any CPU.Build.0 = Release|Any CPU
{E0015649-ADB8-4D25-A14E-B2D5D3AD633F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0015649-ADB8-4D25-A14E-B2D5D3AD633F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0015649-ADB8-4D25-A14E-B2D5D3AD633F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0015649-ADB8-4D25-A14E-B2D5D3AD633F}.Release|Any CPU.Build.0 = Release|Any CPU
{FE0568DD-0D79-4A87-B67D-751E8880F909}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FE0568DD-0D79-4A87-B67D-751E8880F909}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE0568DD-0D79-4A87-B67D-751E8880F909}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE0568DD-0D79-4A87-B67D-751E8880F909}.Release|Any CPU.Build.0 = Release|Any CPU
{25BE0184-A4E6-4373-9096-A9ACE46C6553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25BE0184-A4E6-4373-9096-A9ACE46C6553}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25BE0184-A4E6-4373-9096-A9ACE46C6553}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25BE0184-A4E6-4373-9096-A9ACE46C6553}.Release|Any CPU.Build.0 = Release|Any CPU
{61E7D303-3E52-43CF-B873-DD210A701E0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61E7D303-3E52-43CF-B873-DD210A701E0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61E7D303-3E52-43CF-B873-DD210A701E0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61E7D303-3E52-43CF-B873-DD210A701E0C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{4E4394F6-91C7-43E2-BEDA-B7F8EBBA2C68} = {A08DBB7E-DDD4-49BB-9A49-5E3FB88EE878}
{0CA36021-3FA3-4688-8D61-A2B8A0FB168C} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{D2422F9C-B64F-47B9-AFFF-EC7899AA956D} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{F53D7921-7828-4AF6-BE1E-DB81E80A65CC} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{E72BC0D9-6BD2-4D8D-8A59-ABB2815B1E85} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{BB8C05EF-BC14-4C92-9B07-2A616BA0FF45} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{A4D06911-E1A1-4339-A0F0-0F851F764EB4} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{EC165D4F-A105-482F-B1B5-9BF187410C62} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{E4F3443D-5922-4E44-91A2-3645B2E18949} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{FC2F0665-F55E-4557-90F8-DC66AA2C8658} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{D930DB6F-D3EF-4274-AC56-48268B68F6C2} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{71EB6650-2C03-4DA2-89FA-C4443CB0FB2A} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{60BA8317-9CDB-4002-9E43-88EB8BBB3280} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{0CA36021-3FA3-4688-8D61-A2B8A0FB168C} = {278FD0BB-B382-455E-806F-32680299995D}
{F53D7921-7828-4AF6-BE1E-DB81E80A65CC} = {278FD0BB-B382-455E-806F-32680299995D}
{E72BC0D9-6BD2-4D8D-8A59-ABB2815B1E85} = {278FD0BB-B382-455E-806F-32680299995D}
{BB8C05EF-BC14-4C92-9B07-2A616BA0FF45} = {278FD0BB-B382-455E-806F-32680299995D}
{A4D06911-E1A1-4339-A0F0-0F851F764EB4} = {93D47517-5E43-4E32-B64D-561D5BED4CE7}
{EC165D4F-A105-482F-B1B5-9BF187410C62} = {93D47517-5E43-4E32-B64D-561D5BED4CE7}
{E4F3443D-5922-4E44-91A2-3645B2E18949} = {93D47517-5E43-4E32-B64D-561D5BED4CE7}
{FC2F0665-F55E-4557-90F8-DC66AA2C8658} = {BF1523C2-6954-4994-974E-E77F3ACE8398}
{D930DB6F-D3EF-4274-AC56-48268B68F6C2} = {BF1523C2-6954-4994-974E-E77F3ACE8398}
{71EB6650-2C03-4DA2-89FA-C4443CB0FB2A} = {BF1523C2-6954-4994-974E-E77F3ACE8398}
{60BA8317-9CDB-4002-9E43-88EB8BBB3280} = {BF1523C2-6954-4994-974E-E77F3ACE8398}
{815899B8-C129-469A-B169-2A59E65181F1} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{E41AF4E2-9692-4BF2-BDBB-3F36A2135ADB} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{A1BABC33-523C-419B-8407-67A3BCE53737} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{1BBECE5A-7008-4D23-9DC6-FEC42AB57D85} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{62473356-141D-438C-8D51-D34191F08A26} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{1C21F39F-1045-4890-820E-F4328A2BAF86} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{FDA33857-554F-4616-A674-06417AD6A0AF} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{A1BABC33-523C-419B-8407-67A3BCE53737} = {9DF1EED6-5002-428F-8834-77D201C679DD}
{1BBECE5A-7008-4D23-9DC6-FEC42AB57D85} = {CF4CBCB2-36F4-4D49-AC79-062FB7DDF878}
{62473356-141D-438C-8D51-D34191F08A26} = {CF4CBCB2-36F4-4D49-AC79-062FB7DDF878}
{1C21F39F-1045-4890-820E-F4328A2BAF86} = {CF4CBCB2-36F4-4D49-AC79-062FB7DDF878}
{FDA33857-554F-4616-A674-06417AD6A0AF} = {CF4CBCB2-36F4-4D49-AC79-062FB7DDF878}
{E0015649-ADB8-4D25-A14E-B2D5D3AD633F} = {278FD0BB-B382-455E-806F-32680299995D}
{FE0568DD-0D79-4A87-B67D-751E8880F909} = {CF4CBCB2-36F4-4D49-AC79-062FB7DDF878}
{25BE0184-A4E6-4373-9096-A9ACE46C6553} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{61E7D303-3E52-43CF-B873-DD210A701E0C} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{BF1523C2-6954-4994-974E-E77F3ACE8398} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{278FD0BB-B382-455E-806F-32680299995D} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{93D47517-5E43-4E32-B64D-561D5BED4CE7} = {8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}
{9DF1EED6-5002-428F-8834-77D201C679DD} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{CF4CBCB2-36F4-4D49-AC79-062FB7DDF878} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
{6B4C6C7C-189A-42B4-8860-90652BDCC6B1} = {EB0DAEC2-2EEE-4833-8180-353882615CEC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6E14A063-006D-442F-BBA4-C9CF12D2438A}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Package | Current version | Downloads |
|---|---|---|
| Proffer.Storage | [![NuGet](https://img.shields.io/nuget/v/Proffer.Storage.svg)](https://www.nuget.org/packages/Proffer.Storage/) | [![NuGet](https://img.shields.io/nuget/dt/Proffer.Storage.svg)](https://www.nuget.org/packages/Proffer.Storage/)
| Proffer.Storage.Azure | [![NuGet](https://img.shields.io/nuget/v/Proffer.Storage.Azure.svg)](https://www.nuget.org/packages/Proffer.Storage.Azure/) | [![NuGet](https://img.shields.io/nuget/dt/Proffer.Storage.Azure.svg)](https://www.nuget.org/packages/Proffer.Storage.Azure/)
| Proffer.Storage.Azure.Blobs | [![NuGet](https://img.shields.io/nuget/v/Proffer.Storage.Azure.Blobs.svg)](https://www.nuget.org/packages/Proffer.Storage.Azure.Blobs/) | [![NuGet](https://img.shields.io/nuget/dt/Proffer.Storage.Azure.Blobs.svg)](https://www.nuget.org/packages/Proffer.Storage.Azure.Blobs/)
| Proffer.Storage.FileSystem.Properties.Json | [![NuGet](https://img.shields.io/nuget/v/Proffer.Storage.FileSystem.Properties.Json.svg)](https://www.nuget.org/packages/Proffer.Storage.FileSystem.Properties.Json/) | [![NuGet](https://img.shields.io/nuget/dt/Proffer.Storage.FileSystem.Properties.Json.svg)](https://www.nuget.org/packages/Proffer.Storage.FileSystem.Properties.Json/)
| Proffer.Storage.FileSystem.Server | [![NuGet](https://img.shields.io/nuget/v/Proffer.Storage.FileSystem.Server.svg)](https://www.nuget.org/packages/Proffer.Storage.FileSystem.Server/) | [![NuGet](https://img.shields.io/nuget/dt/Proffer.Storage.FileSystem.Server.svg)](https://www.nuget.org/packages/Proffer.Storage.FileSystem.Server/)
| Proffer.Templating | [![NuGet](https://img.shields.io/nuget/v/Proffer.Templating.svg)](https://www.nuget.org/packages/Proffer.Templating/) | [![NuGet](https://img.shields.io/nuget/dt/Proffer.Templating.svg)](https://www.nuget.org/packages/Proffer.Templating/)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
namespace Proffer.Storage.Azure.Configuration
namespace Proffer.Azure.Configuration
{
using Proffer.Storage.Configuration;

/// <summary>
/// Options for an instance of <see cref="AzureStorageProvider"/>.
/// Proffer options pointing to an Azure Storage account.
/// </summary>
/// <seealso cref="ProviderInstanceOptions" />
public class AzureProviderInstanceOptions : ProviderInstanceOptions
public interface IAzureStorageOptions
{
/// <summary>
/// Gets or sets the connection string.
Expand Down
23 changes: 23 additions & 0 deletions src/Proffer.Azure/Proffer.Azure.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>Proffer.Azure</AssemblyName>
<PackageId>Proffer.Azure</PackageId>
<Description>Proffer Azure common abstractions.</Description>
<Product>Proffer</Product>
<Authors>Adrien Siffermann</Authors>
<RepositoryUrl>https://github.com/asiffermann/proffer</RepositoryUrl>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>netstandard2</TargetFramework>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Common" Version="12.7.2" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Proffer.Email.InMemory/IInMemoryEmailRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface IInMemoryEmailRepository
/// <summary>
/// Gets the emails store.
/// </summary>
IReadOnlyCollection<InMemoryEmail> Store { get;}
IReadOnlyCollection<InMemoryEmail> Store { get; }

/// <summary>
/// Saves the specified email in the store.
Expand Down
4 changes: 2 additions & 2 deletions src/Proffer.Email.Smtp/SmtpEmailProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ public async Task SendEmailAsync(IEmailAddress from, IEnumerable<IEmailAddress>
var message = new MimeMessage();
message.From.Add(new MailboxAddress(from.DisplayName, from.Email));

if(replyTo != null)
if (replyTo != null)
{
message.ReplyTo.Add(new MailboxAddress(replyTo.DisplayName, replyTo.Email));
}

foreach (IEmailAddress recipient in recipients)
{
message.To.Add(new MailboxAddress(recipient.DisplayName, recipient.Email));
Expand Down
4 changes: 2 additions & 2 deletions src/Proffer.Email/Internal/EmailSender.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Proffer.Email.Internal
{
using Microsoft.Extensions.Options;
using Storage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Storage;
using Templating;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Proffer.Email/Options/EmailOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Proffer.Email
/// <summary>
/// The Proffer.Email options with providers.
/// </summary>
public class EmailOptions
public class EmailOptions
{
/// <summary>
/// The default configuration section name.
Expand Down
2 changes: 1 addition & 1 deletion src/Proffer.Email/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static IServiceCollection AddEmail(this IServiceCollection services, ICon
public static IServiceCollection AddEmail(this IServiceCollection services, IConfigurationRoot configurationRoot, string sectionName = EmailOptions.DefaultConfigurationSectionName)
{
return services
.Configure<EmailOptions>(configurationRoot.GetSection(sectionName))
.Configure<EmailOptions>(configurationRoot.GetSection(sectionName))
.AddEmail();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
namespace Proffer.Storage.Azure
namespace Proffer.Storage.Azure.Blobs
{
using Microsoft.Extensions.Options;
using Proffer.Storage.Azure.Configuration;
using Proffer.Storage.Azure.Blobs.Configuration;
using Proffer.Storage.Internal;
using Storage;

/// <summary>
/// A provider to handle and build file stores pointing on an Azure Storage account.
/// </summary>
/// <seealso cref="StorageProviderBase{TParsedOptions, TInstanceOptions, TStoreOptions, TScopedStoreOptions}" />
public class AzureStorageProvider : StorageProviderBase<AzureParsedOptions, AzureProviderInstanceOptions, AzureStoreOptions, AzureScopedStoreOptions>
public class AzureBlobsStorageProvider : StorageProviderBase<AzureBlobsParsedOptions, AzureBlobsProviderOptions, AzureBlobsStoreOptions, AzureBlobsScopedStoreOptions>
{
/// <summary>
/// The <see cref="AzureStorageProvider"/> name.
/// The <see cref="AzureBlobsStorageProvider"/> name.
/// </summary>
public const string ProviderName = "Azure";

/// <summary>
/// Initializes a new instance of the <see cref="AzureStorageProvider"/> class.
/// Initializes a new instance of the <see cref="AzureBlobsStorageProvider"/> class.
/// </summary>
/// <param name="options">The options.</param>
public AzureStorageProvider(IOptions<AzureParsedOptions> options)
public AzureBlobsStorageProvider(IOptions<AzureBlobsParsedOptions> options)
: base(options)
{
}
Expand All @@ -38,6 +38,6 @@ public AzureStorageProvider(IOptions<AzureParsedOptions> options)
/// <returns>
/// A configured <see cref="IStore" />.
/// </returns>
protected override IStore BuildStoreInternal(string storeName, AzureStoreOptions storeOptions) => new AzureStore(storeOptions);
protected override IStore BuildStoreInternal(string storeName, AzureBlobsStoreOptions storeOptions) => new AzureBlobsStore(storeOptions);
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
namespace Proffer.Storage
{
using Azure;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using Proffer.Storage.Azure.Configuration;
using Proffer.Storage.Azure.Blobs;
using Proffer.Storage.Azure.Blobs.Configuration;
using Proffer.Storage.Internal;

/// <summary>
/// <see cref="IServiceCollection"/> extension methods.
/// </summary>
public static class AzureStorageServiceCollectionExtensions
public static class AzureBlobsStorageServiceCollectionExtensions
{
/// <summary>
/// Registers the Proffer.Storage services to Azure Storage.
/// Registers the Proffer.Storage services to Azure Blobs.
/// </summary>
/// <param name="services">The service collection.</param>
/// <returns>The service collection.</returns>
public static IServiceCollection AddAzureStorage(this IServiceCollection services)
{
services
.AddSingleton<IConfigureOptions<AzureParsedOptions>, ConfigureProviderOptions<AzureParsedOptions, AzureProviderInstanceOptions, AzureStoreOptions, AzureScopedStoreOptions>>()
.TryAddEnumerable(ServiceDescriptor.Transient<IStorageProvider, AzureStorageProvider>());
.AddSingleton<IConfigureOptions<AzureBlobsParsedOptions>, ConfigureProviderOptions<AzureBlobsParsedOptions, AzureBlobsProviderOptions, AzureBlobsStoreOptions, AzureBlobsScopedStoreOptions>>()
.TryAddEnumerable(ServiceDescriptor.Transient<IStorageProvider, AzureBlobsStorageProvider>());

return services;
}
Expand Down
Loading