~ruther/NosSmooth

53f156e12bb77c47d1bb14c17e23bf4d01b02565 — František Boháček 3 years ago 43fc69e
feat: add walk command handling to service collection
1 files changed, 7 insertions(+), 1 deletions(-)

M Local/NosSmooth.LocalClient/Extensions/ServiceCollectionExtensions.cs
M Local/NosSmooth.LocalClient/Extensions/ServiceCollectionExtensions.cs => Local/NosSmooth.LocalClient/Extensions/ServiceCollectionExtensions.cs +7 -1
@@ 9,6 9,8 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
using NosSmooth.Core.Client;
using NosSmooth.Core.Extensions;
using NosSmooth.LocalClient.CommandHandlers;
using NosSmooth.LocalClient.CommandHandlers.Walk;
using NosSmooth.LocalClient.Hooks;
using NosSmoothCore;

namespace NosSmooth.LocalClient.Extensions;


@@ 26,8 28,12 @@ public static class ServiceCollectionExtensions
    public static IServiceCollection AddLocalClient(this IServiceCollection serviceCollection)
    {
        serviceCollection.AddNostaleCore();
        serviceCollection.AddCommandHandler<WalkCommandHandler>();
        serviceCollection
            .AddCommandHandler<WalkCommandHandler>()
            .AddPacketResponder<WalkPacketResponder>()
            .AddSingleton<WalkStatus>();
        serviceCollection.TryAddSingleton<NostaleLocalClient>();
        serviceCollection.TryAddSingleton<NostaleHookManager>();
        serviceCollection.TryAddSingleton<NosClient>();
        serviceCollection.TryAddSingleton<INostaleClient>(p => p.GetRequiredService<NostaleLocalClient>());


Do not follow this link