diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-25 03:07:05 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-25 03:07:05 +0200 |
commit | f866946fbbe962c712049327ade9dcbd43900295 (patch) | |
tree | 3400fcce20f68a6ef3eb130f4ef57733e346d0e9 /MatrixRoomUtils.Bot/Program.cs | |
parent | Working sync (diff) | |
download | MatrixUtils-f866946fbbe962c712049327ade9dcbd43900295.tar.xz |
Working state, refactored Rory&::LibMatrix
Diffstat (limited to 'MatrixRoomUtils.Bot/Program.cs')
-rw-r--r-- | MatrixRoomUtils.Bot/Program.cs | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/MatrixRoomUtils.Bot/Program.cs b/MatrixRoomUtils.Bot/Program.cs index 441003e..e8a5b96 100644 --- a/MatrixRoomUtils.Bot/Program.cs +++ b/MatrixRoomUtils.Bot/Program.cs @@ -7,20 +7,16 @@ using Microsoft.Extensions.Hosting; Console.WriteLine("Hello, World!"); -using IHost host = Host.CreateDefaultBuilder(args) - .ConfigureServices((_, services) => { - services.AddScoped<TieredStorageService>(x => - new( - cacheStorageProvider: new FileStorageProvider("data/cache/"), - dataStorageProvider: new FileStorageProvider("data/data/") - ) - ); - - services.AddRoryLibMatrixServices(); - - services.AddHostedService<MRUBot>(); - }) - .Build(); - +var host = Host.CreateDefaultBuilder(args).ConfigureServices((_, services) => { + services.AddScoped<TieredStorageService>(x => + new( + cacheStorageProvider: new FileStorageProvider("bot_data/cache/"), + dataStorageProvider: new FileStorageProvider("bot_data/data/") + ) + ); + services.AddScoped<MRUBotConfiguration>(); + services.AddRoryLibMatrixServices(); + services.AddHostedService<MRUBot>(); +}).UseConsoleLifetime().Build(); await host.RunAsync(); \ No newline at end of file |