fix: preserve history sentinels and alarm SDK metadata
This commit is contained in:
@@ -21,6 +21,10 @@ internal static class SdkValueBoundary
|
||||
throw new ArgumentException("Unsupported OPC UA value type.", nameof(value));
|
||||
}
|
||||
|
||||
/// <summary>Map the UA zero timestamp to the application's existing unspecified-bound sentinel.</summary>
|
||||
internal static DateTime ToClrTimestamp(DateTimeUtc value) => value == DateTimeUtc.MinValue
|
||||
? DateTime.SpecifyKind(DateTime.MinValue, DateTimeKind.Utc) : value.ToDateTime();
|
||||
|
||||
/// <summary>Restore existing CLR payload types and detach mutable arrays.</summary>
|
||||
internal static object? ToClr(Variant value) => value.AsBoxedObject(Variant.BoxingBehavior.Legacy) switch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user