Continue to modularize even more components
This commit is contained in:
parent
c1b0d88b4c
commit
81f156475d
|
|
@ -1,6 +1,6 @@
|
||||||
using TwilioSMSReceiver.Data.Models;
|
using TwilioSMSReceiver.Data.Models;
|
||||||
|
|
||||||
namespace TwilioSMSReceiver.Interfaces
|
namespace TwilioSMSReceiver.Common.Interfaces
|
||||||
{
|
{
|
||||||
public interface IMessageHandler
|
public interface IMessageHandler
|
||||||
{
|
{
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using TwilioSMSReceiver.Common.Interfaces;
|
||||||
using TwilioSMSReceiver.Data;
|
using TwilioSMSReceiver.Data;
|
||||||
using TwilioSMSReceiver.Data.Models;
|
using TwilioSMSReceiver.Data.Models;
|
||||||
|
|
||||||
namespace TwilioSMSReceiver.Interfaces
|
namespace TwilioSMSReceiver.Common.MessageHandlers
|
||||||
{
|
{
|
||||||
public abstract class BaseHandler : IMessageHandler
|
public abstract class BaseHandler : IMessageHandler
|
||||||
{
|
{
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
using TwilioSMSReceiver.Data.Models;
|
using TwilioSMSReceiver.Data.Models;
|
||||||
using TeamsHook.NET;
|
using TeamsHook.NET;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using TwilioSMSReceiver.Common.MessageHandlers;
|
||||||
|
|
||||||
namespace TwilioSMSReceiver.Interfaces
|
namespace TwilioSMSReceiver.Common.Handlers
|
||||||
{
|
{
|
||||||
public class MSTeamsHandler : BaseHandler
|
public class MSTeamsHandler : BaseHandler
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using TwilioSMSReceiver.Data.Models;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using TwilioSMSReceiver.Common.MessageHandlers;
|
||||||
|
using TwilioSMSReceiver.Data.Models;
|
||||||
|
|
||||||
namespace TwilioSMSReceiver.Interfaces
|
namespace TwilioSMSReceiver.Common.Handlers
|
||||||
{
|
{
|
||||||
public class SMTPHandler : BaseHandler
|
public class SMTPHandler : BaseHandler
|
||||||
{
|
{
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="TeamsHook.NET" Version="0.1.0.18" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\TwilioSMSReceiver.Data\TwilioSMSReceiver.Data.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -10,6 +10,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TwilioSMSReceiver", "Twilio
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwilioSMSReceiver.Data", "TwilioSMSReceiver.Data\TwilioSMSReceiver.Data.csproj", "{642DADA5-E7A1-4754-A035-E2498C6CCF38}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwilioSMSReceiver.Data", "TwilioSMSReceiver.Data\TwilioSMSReceiver.Data.csproj", "{642DADA5-E7A1-4754-A035-E2498C6CCF38}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwilioSMSReceiver.Common", "TwilioSMSReceiver.Common\TwilioSMSReceiver.Common.csproj", "{09A6960F-AA69-4EF9-94DC-9BA5FDBB4E4A}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|
@ -24,6 +26,10 @@ Global
|
||||||
{642DADA5-E7A1-4754-A035-E2498C6CCF38}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{642DADA5-E7A1-4754-A035-E2498C6CCF38}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{642DADA5-E7A1-4754-A035-E2498C6CCF38}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{642DADA5-E7A1-4754-A035-E2498C6CCF38}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{642DADA5-E7A1-4754-A035-E2498C6CCF38}.Release|Any CPU.Build.0 = Release|Any CPU
|
{642DADA5-E7A1-4754-A035-E2498C6CCF38}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{09A6960F-AA69-4EF9-94DC-9BA5FDBB4E4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{09A6960F-AA69-4EF9-94DC-9BA5FDBB4E4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{09A6960F-AA69-4EF9-94DC-9BA5FDBB4E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{09A6960F-AA69-4EF9-94DC-9BA5FDBB4E4A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@ using Twilio.AspNet.Common;
|
||||||
using TwilioSMSReceiver;
|
using TwilioSMSReceiver;
|
||||||
using TwilioSMSReceiver.Data;
|
using TwilioSMSReceiver.Data;
|
||||||
using TwilioSMSReceiver.Data.Models;
|
using TwilioSMSReceiver.Data.Models;
|
||||||
using TwilioSMSReceiver.Interfaces;
|
using TwilioSMSReceiver.Common.Interfaces;
|
||||||
|
using TwilioSMSReceiver.Common.Handlers;
|
||||||
|
|
||||||
namespace TwilioSMSReceiver.Controllers
|
namespace TwilioSMSReceiver.Controllers
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using TwilioSMSReceiver;
|
using TwilioSMSReceiver;
|
||||||
using TwilioSMSReceiver.Interfaces;
|
using TwilioSMSReceiver.Common.Handlers;
|
||||||
|
using TwilioSMSReceiver.Common.Interfaces;
|
||||||
using TwilioSMSReceiver.Data;
|
using TwilioSMSReceiver.Data;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Migrations\" />
|
<ProjectReference Include="..\TwilioSMSReceiver.Common\TwilioSMSReceiver.Common.csproj" />
|
||||||
<Folder Include="Models\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\TwilioSMSReceiver.Data\TwilioSMSReceiver.Data.csproj" />
|
<ProjectReference Include="..\TwilioSMSReceiver.Data\TwilioSMSReceiver.Data.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue