~ruther/Nostale-Anonymizer

ref: f56393bbc61224da75465542183e478910640a70 Nostale-Anonymizer/src/Anonymizer/Movers/AbstractMover.cs -rw-r--r-- 691 bytes
f56393bb — František Boháček feat: add new movers 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
//
//  AbstractMover.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 NosSmooth.Packets;

namespace Anonymizer.Movers;

/// <inheritdoc />
public abstract class AbstractMover<TPacket> : IMover<TPacket>
    where TPacket : IPacket
{
    /// <inheritdoc />
    public abstract TPacket Move(IAnonymizer anonymizer, TPacket packet);

    /// <inheritdoc />
    public bool ShouldHandle(IPacket packet)
        => packet is TPacket;

    /// <inheritdoc />
    public IPacket Move(IAnonymizer anonymizer, IPacket packet)
        => Move(anonymizer, (TPacket)packet);
}
Do not follow this link