Cbor часть 2, десериализация

This commit is contained in:
2025-02-25 08:43:01 +03:00
parent 05ee651e89
commit c0bb3c523a
7 changed files with 322 additions and 38 deletions
+5 -5
View File
@@ -5,12 +5,12 @@ namespace mROA.Cbor
{
public interface IContextualSerializationToolKit
{
byte[] Serialize<T>(T objectToSerialize, IEndPointContext context);
byte[] Serialize(object objectToSerialize, Type type, IEndPointContext context);
byte[] Serialize(object objectToSerialize, IEndPointContext context);
void Serialize(object objectToSerialize, Span<byte> destination, IEndPointContext context);
T Deserialize<T>(byte[] rawData, IEndPointContext context);
object? Deserialize(byte[] rawData, Type type, IEndPointContext context);
T Deserialize<T>(Span<byte> rawData, IEndPointContext context);
object? Deserialize(Span<byte> rawData, Type type, IEndPointContext context);
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);
T Cast<T>(object nonCasted, IEndPointContext context);
object Cast(object nonCasted, Type type, IEndPointContext context);
}