Compression
This commit is contained in:
24
src/Tools/FileTime.Tools.Compression/Startup.cs
Normal file
24
src/Tools/FileTime.Tools.Compression/Startup.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user