Skip to content

Commit

Permalink
Add the new stuff to services
Browse files Browse the repository at this point in the history
  • Loading branch information
Sella-GH committed Jun 9, 2024
1 parent ace484c commit 273fd3c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion AzzyBot-Next/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
using System.Threading.Tasks;
using AzzyBot.Database;
using AzzyBot.Services;
using AzzyBot.Services.Interfaces;
using AzzyBot.Services.Modules;
using AzzyBot.Services.Queues;
using AzzyBot.Settings;
using AzzyBot.Utilities;
using AzzyBot.Utilities.Encryption;
Expand All @@ -32,7 +34,7 @@ public static void AzzyBotServices(this IServiceCollection services)
services.AddSingleton<CoreServiceHost>();
services.AddHostedService(s => s.GetRequiredService<CoreServiceHost>());

services.AddSingleton<AzuraCastService>();
services.AddSingleton<AzuraCastApiService>();

string connectionString = GetConnectionString(settings.Database?.Host, settings.Database?.Port, settings.Database?.User, settings.Database?.Password, settings.Database?.DatabaseName);
CheckIfDatabaseIsOnline(connectionString);
Expand All @@ -46,6 +48,10 @@ public static void AzzyBotServices(this IServiceCollection services)

services.AddSingleton<WebRequestService>();
services.AddSingleton<UpdaterService>();

services.AddSingleton<AzuraCastFileService>();
services.AddHostedService<AzuraCastFileServiceHost>();
services.AddSingleton<IQueuedBackgroundTask>(_ => new AzuraCastFileTask());
services.AddHostedService(s => s.GetRequiredService<TimerServiceHost>());
}

Expand Down

0 comments on commit 273fd3c

Please sign in to comment.