using System; using mROA.Abstract; namespace mROA.Cbor { public interface IContextualSerializationToolKit : ISerializationToolkit { byte[] Serialize(object objectToSerialize, IEndPointContext? context); void Serialize(object objectToSerialize, Span destination, IEndPointContext? context); T Deserialize(byte[] rawData, IEndPointContext? context); object? Deserialize(byte[] rawData, Type type, IEndPointContext? context); T Deserialize(ReadOnlyMemory rawMemory, IEndPointContext? context); object? Deserialize(ReadOnlyMemory rawMemory, Type type, IEndPointContext? context); T Cast(object nonCasted, IEndPointContext? context); object? Cast(object nonCasted, Type type, IEndPointContext? context); } }