Доработки и внедрение cbor сериализации

This commit is contained in:
2025-02-27 00:12:52 +03:00
parent b4ccfdd51c
commit 46732da780
12 changed files with 213 additions and 64 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
using System;
using System.Text.Json.Serialization;
using mROA.Implementation.Attributes;
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
@@ -20,7 +21,7 @@ namespace mROA.Implementation
public int CommandId { get; set; }
public int ObjectId { get; set; } = -1;
[JsonIgnore]
[SerializationIgnore]
public Type? ParameterType { get; set; }
public object? Parameter { get; set; }
@@ -1,6 +1,7 @@
using System;
using System.Text.Json.Serialization;
using mROA.Abstract;
using mROA.Implementation.Attributes;
// ReSharper disable UnusedAutoPropertyAccessor.Global
@@ -9,9 +10,9 @@ namespace mROA.Implementation.CommandExecution
public class FinalCommandExecution : ICommandExecution
{
public Guid Id { get; set; }
[JsonIgnore]
[SerializationIgnore]
public int ClientId { get; set; }
[JsonIgnore]
[SerializationIgnore]
public int CommandId { get; set; }
}
@@ -1,11 +1,12 @@
using System;
using System.Text.Json.Serialization;
using mROA.Implementation.Attributes;
namespace mROA.Implementation.CommandExecution
{
public class TypedFinalCommandExecution : FinalCommandExecution<object>
{
[JsonIgnore]
[SerializationIgnore]
// ReSharper disable once UnusedAutoPropertyAccessor.Global
public Type? Type { get; set; }
}
+3 -2
View File
@@ -2,6 +2,7 @@
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using mROA.Abstract;
using mROA.Implementation.Attributes;
// ReSharper disable UnusedMember.Global
#pragma warning disable CS8618, CS9264
@@ -41,7 +42,7 @@ namespace mROA.Implementation
public class SharedObject<T> : ISharedObject where T : notnull
{
[JsonIgnore]
[SerializationIgnore]
public IEndPointContext EndPointContext { get; set; } = new EndPointContext
{
RealRepository = TransmissionConfig.RealContextRepository,
@@ -88,7 +89,7 @@ namespace mROA.Implementation
}
}
[JsonIgnore]
[SerializationIgnore]
public T Value { get; private set; }
// ReSharper disable once MemberCanBePrivate.Global