Compression

This commit is contained in:
2023-08-02 12:40:40 +02:00
parent 5508828717
commit c95be170ed
34 changed files with 505 additions and 66 deletions

View File

@@ -0,0 +1,24 @@
using FileTime.App.Core.Services;
using Microsoft.Extensions.DependencyInjection;
namespace FileTime.Tools.Compression;
public class StartupHandler : IStartupHandler
{
public StartupHandler(IIdentifiableUserCommandService identifiableUserCommandService)
{
identifiableUserCommandService.AddIdentifiableUserCommand(CompressUserCommand.Instance);
}
public Task InitAsync() => Task.CompletedTask;
}
public static class Startup
{
public static IServiceCollection AddCompression(this IServiceCollection services)
{
services.AddSingleton<IStartupHandler, StartupHandler>();
services.AddSingleton<CompressCommandFactory>();
services.AddSingleton<IUserCommandHandler, CompressionUserCommandHandler>();
return services;
}
}