mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-11 16:32:57 +00:00
96f23f163d
Protobuf implementation
38 lines
903 B
C#
38 lines
903 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace CryptoExchange.Net.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Serializer interface
|
|
/// </summary>
|
|
public interface IMessageSerializer
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Serialize to byte array
|
|
/// </summary>
|
|
public interface IByteMessageSerializer: IMessageSerializer
|
|
{
|
|
/// <summary>
|
|
/// Serialize an object to a string
|
|
/// </summary>
|
|
/// <param name="message"></param>
|
|
/// <returns></returns>
|
|
byte[] Serialize<T>(T message);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Serialize to string
|
|
/// </summary>
|
|
public interface IStringMessageSerializer: IMessageSerializer
|
|
{
|
|
/// <summary>
|
|
/// Serialize an object to a string
|
|
/// </summary>
|
|
/// <param name="message"></param>
|
|
/// <returns></returns>
|
|
string Serialize<T>(T message);
|
|
}
|
|
}
|