2025-02-24 12:48:31 +03:00
|
|
|
using System;
|
|
|
|
|
using mROA.Abstract;
|
|
|
|
|
|
|
|
|
|
namespace mROA.Cbor
|
|
|
|
|
{
|
|
|
|
|
public interface IContextualSerializationToolKit
|
|
|
|
|
{
|
2025-02-25 08:43:01 +03:00
|
|
|
byte[] Serialize(object objectToSerialize, IEndPointContext context);
|
|
|
|
|
void Serialize(object objectToSerialize, Span<byte> destination, IEndPointContext context);
|
2025-02-24 12:48:31 +03:00
|
|
|
T Deserialize<T>(byte[] rawData, IEndPointContext context);
|
2025-02-25 08:43:01 +03:00
|
|
|
object Deserialize(byte[] rawData, Type type, IEndPointContext context);
|
|
|
|
|
T Deserialize<T>(ReadOnlyMemory<byte> rawData, IEndPointContext context);
|
|
|
|
|
object Deserialize(ReadOnlyMemory<byte> rawData, Type type, IEndPointContext context);
|
2025-02-24 12:48:31 +03:00
|
|
|
T Cast<T>(object nonCasted, IEndPointContext context);
|
|
|
|
|
object Cast(object nonCasted, Type type, IEndPointContext context);
|
|
|
|
|
}
|
|
|
|
|
}
|