TwilioSMSReceiver/TwilioSMSReceiver.Common/RegisterDI.cs

25 lines
799 B
C#

using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TwilioSMSReceiver.Common.Handlers;
using TwilioSMSReceiver.Common.Interfaces;
namespace TwilioSMSReceiver.Common.Registrations
{
public static class RegisterDI
{
/// <summary>
/// This registers all dependencies needed to support this app
/// </summary>
/// <param name="provider">The Service Collection that will hold all depedencies</param>
public static void RegisterSMSExtensions(this IServiceCollection provider)
{
provider.AddScoped<IMessageHandler, SMTPHandler>();
provider.AddScoped<IMessageHandler, MSTeamsHandler>();
}
}
}