//
// PacketSenderViewModel.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 System;
using NosSmooth.PacketSerializer.Abstractions.Attributes;
using PacketLogger.Models.Packets;
namespace PacketLogger.ViewModels.Sender;
///
public class PacketSenderViewModel : ViewModelBase, IDisposable
{
///
/// Initializes a new instance of the class.
///
/// The packet sender.
public PacketSenderViewModel(IPacketProvider packetSender)
{
RecvSubViewModel = new PacketSendSubViewModel(PacketSource.Server, packetSender);
SendSubViewModel = new PacketSendSubViewModel(PacketSource.Client, packetSender);
}
///
/// Gets the packet recv sub view.
///
public PacketSendSubViewModel RecvSubViewModel { get; }
///
/// Gets the packet send sub view.
///
public PacketSendSubViewModel SendSubViewModel { get; }
///
public void Dispose()
{
RecvSubViewModel.Dispose();
SendSubViewModel.Dispose();
}
}