2021-11-29 21:48:00 +00:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Selector.Web.Service;
|
2021-12-19 13:44:22 +00:00
|
|
|
|
using Selector.Web.Hubs;
|
2021-11-29 21:48:00 +00:00
|
|
|
|
|
|
|
|
|
namespace Selector.Web.Extensions
|
|
|
|
|
{
|
|
|
|
|
public static class ServiceExtensions
|
|
|
|
|
{
|
|
|
|
|
public static void AddCacheHubProxy(this IServiceCollection services)
|
|
|
|
|
{
|
2021-12-19 13:44:22 +00:00
|
|
|
|
services.AddScoped<EventHubProxy>();
|
2021-12-19 18:44:03 +00:00
|
|
|
|
services.AddHostedService<EventHubMappingService>();
|
2021-12-19 13:44:22 +00:00
|
|
|
|
|
|
|
|
|
services.AddScoped<IEventHubMapping<NowPlayingHub, INowPlayingHubClient>, NowPlayingHubMapping>();
|
|
|
|
|
services.AddScoped<NowPlayingHubMapping>();
|
2021-11-29 21:48:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|