|
@@ -805,6 +805,10 @@ namespace InABox.Core
|
|
|
{
|
|
|
writer.Write(time.Ticks);
|
|
|
}
|
|
|
+ else if (type == typeof(LoggablePropertyAttribute) && value is LoggablePropertyAttribute lpa)
|
|
|
+ {
|
|
|
+ writer.Write(lpa.Format ?? "");
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
throw new Exception($"Invalid type; Target DataType is {type} and value DataType is {value?.GetType().ToString() ?? "null"}");
|
|
@@ -907,6 +911,13 @@ namespace InABox.Core
|
|
|
{
|
|
|
return new TimeSpan(reader.ReadInt64());
|
|
|
}
|
|
|
+ else if (type == typeof(LoggablePropertyAttribute))
|
|
|
+ {
|
|
|
+ String format = reader.ReadString();
|
|
|
+ return String.IsNullOrWhiteSpace(format)
|
|
|
+ ? null
|
|
|
+ : new LoggablePropertyAttribute() { Format = format };
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
throw new Exception($"Invalid type; Target DataType is {type}");
|