Creado apartir del commit b888de6c92056de294456f581a56e25e734d4ab7 de develop
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using adas_core.Domain.Enums;
|
||||
using adas_core.Domain.Models.GroupedObservations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace adas_core.Domain.Models.SignalR;
|
||||
|
||||
public class Message
|
||||
{
|
||||
public long IdMessage { get; set; }
|
||||
|
||||
public MessageData? Data { get; set; }
|
||||
|
||||
public string? Version { get; set; }
|
||||
|
||||
public List<GroupedField>? GroupedFields { get; set; }
|
||||
|
||||
public string OperationStr
|
||||
{
|
||||
get => Operation.ToString("g");
|
||||
set => Operation = (SubscriptionEnum.Type)Enum.Parse(typeof(SubscriptionEnum.Type), value);
|
||||
}
|
||||
|
||||
public SubscriptionEnum.Type Operation { get; set; }
|
||||
|
||||
|
||||
public override string? ToString()
|
||||
{
|
||||
try
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.None,
|
||||
new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore });
|
||||
}
|
||||
catch
|
||||
{
|
||||
return base.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user