MailSharp / MailSharp.Common / Extensions / CommonServiceExtensions.cs
Code · 14 lines · 410 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14using MailSharp.Common.Services;

namespace MailSharp.Common.Extensions;

public static class CommonServiceExtensions
{
	// Adds Authentication and Mailbox  services to the specified IServiceCollection
	public static IServiceCollection AddCommonServices(this IServiceCollection services)
	{
		services.AddSingleton<AuthenticationService>();
		services.AddSingleton<MailboxService>();
		return services;
	}
}