fix: preserve history sentinels and alarm SDK metadata

This commit is contained in:
Joseph Doherty
2026-11-10 10:20:53 -05:00
parent a43d20e614
commit 0eb2976ade
4 changed files with 23 additions and 12 deletions
@@ -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
{