// // IPacketSerializer.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 NosCore.Packets; using NosCore.Packets.Interfaces; using Remora.Results; namespace NosSmooth.Core.Packets; /// /// Represents serialiazer and deserializer of . /// public interface IPacketSerializer { /// /// Serializes the given into string. /// /// The packet to serialize. /// The serialized packet. public Result Serialize(IPacket packet); /// /// Deserializes the given string into . /// /// The packet to deserialize. /// The deserialized packet. public Result Deserialize(string packetString); /// /// Gets the inner serializer from NosCore. /// [Obsolete("May be removed anytime.")] public Serializer Serializer { get; } /// /// Gets the inner deserializer from NosCore. /// [Obsolete("May be removed anytime.")] public Deserializer Deserializer { get; } }