about summary refs log tree commit diff
path: root/MatrixRoomUtils.Bot/Program.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-19 02:36:32 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-19 02:36:32 +0200
commited2205972a7b7d6fdd4563c3775a83616920597a (patch)
tree54aec1cfdf861fd8a7739be131fbe79ae24d91e4 /MatrixRoomUtils.Bot/Program.cs
parentPartial refactor (diff)
downloadMatrixUtils-ed2205972a7b7d6fdd4563c3775a83616920597a.tar.xz
Working sync
Diffstat (limited to 'MatrixRoomUtils.Bot/Program.cs')
-rw-r--r--MatrixRoomUtils.Bot/Program.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Bot/Program.cs b/MatrixRoomUtils.Bot/Program.cs

index 83fa4f4..441003e 100644 --- a/MatrixRoomUtils.Bot/Program.cs +++ b/MatrixRoomUtils.Bot/Program.cs
@@ -1,2 +1,26 @@ // See https://aka.ms/new-console-template for more information + +using MatrixRoomUtils.Bot; +using MatrixRoomUtils.Core.Services; +using Microsoft.Extensions.DependencyInjection; +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(); + + +await host.RunAsync(); \ No newline at end of file