~ruther/NosSmooth

ref: 452ad538384649d50af3b78d4df8849ae6ece89b NosSmooth/Extensions/NosSmooth.Extensions.Combat/Extensions/ServiceCollectionExtensions.cs -rw-r--r-- 1.0 KiB
452ad538 — Rutherther chore(game): update version 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
//  ServiceCollectionExtensions.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using Microsoft.Extensions.DependencyInjection;
using NosSmooth.Core.Extensions;
using NosSmooth.Extensions.Combat.Responders;

namespace NosSmooth.Extensions.Combat.Extensions;

/// <summary>
/// Extension methods for <see cref="IServiceCollection"/>.
/// </summary>
public static class ServiceCollectionExtensions
{
    /// <summary>
    /// Adds a NosTale combat extension. <see cref="CombatManager"/>.
    /// </summary>
    /// <param name="serviceCollection">The service collection.</param>
    /// <returns>The collection.</returns>
    public static IServiceCollection AddNostaleCombat(this IServiceCollection serviceCollection)
    {
        return serviceCollection
            .AddPacketResponder<CancelResponder>()
            .AddPacketResponder<SuResponder>()
            .AddSingleton<CombatManager>();
    }
}
Do not follow this link