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