Drop SupportedOSPlatform gates; SDK now runs on Linux

The dialect / orchestrators were defensively gated on Windows because
HistorianSspiClient previously P/Invoked InitializeSecurityContextW. With
that replaced by NegotiateAuthentication (cross-platform), the gates are
unnecessary. Removed them from:

- Historian2020ProtocolDialect (4 read paths + 3 status helpers)
- HistorianClient.EnsureTagAsync / DeleteTagAsync
- HistorianWcf{Auth,Read,Event,Status,TagWrite}Orchestrator/Helper
- HistorianWcf{HistAddressing,MessageCapture}Behavior
- HistorianWcfBindingFactory (with #pragma on the Named-Pipe builder
  which still requires Windows at the BCL level)

Runtime constraint: LocalPipe and RemoteTcpIntegrated transports still
require Windows because NetNamedPipeBinding and the Windows transport
security binding are Windows-only at the BCL level. RemoteTcpCertificate
is now usable from Linux, and ProbeAsync is verified working from a
Debian client (10.100.0.35) against the Windows Historian (10.100.0.48).

171/171 tests still pass on Windows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-05-04 22:27:57 -04:00
parent 7e4d713eb3
commit b8280a1465
10 changed files with 8 additions and 76 deletions
@@ -1,5 +1,4 @@
using System.Net.Security;
using System.Runtime.Versioning;
using System.ServiceModel;
using System.ServiceModel.Channels;
@@ -92,7 +91,10 @@ internal static class HistorianWcfBindingFactory
};
}
[SupportedOSPlatform("windows")]
// NetNamedPipeBinding is Windows-only at the BCL level; calling this on Linux
// throws PlatformNotSupportedException at runtime. Cross-platform callers should
// choose Transport = RemoteTcpCertificate (or RemoteTcpIntegrated on Windows).
#pragma warning disable CA1416 // Documented Windows-only entry point
public static Binding CreateMdasNetNamedPipeBinding(TimeSpan timeout, int maxBufferSize = 64 * 1024 * 1024)
{
NetNamedPipeBinding nativeShape = new()
@@ -121,8 +123,8 @@ internal static class HistorianWcfBindingFactory
SendTimeout = timeout
};
}
#pragma warning restore CA1416
[SupportedOSPlatform("windows")]
public static (Binding HistoryBinding, EndpointAddress HistoryEndpoint, Binding RetrievalBinding, EndpointAddress RetrievalEndpoint) CreateBindingPair(
HistorianClientOptions options)
{
@@ -188,7 +190,9 @@ internal static class HistorianWcfBindingFactory
/// transport-security upgrade that the History service negotiates; the established session
/// authenticates the client already.
/// </summary>
[SupportedOSPlatform("windows")]
// NetNamedPipeBinding / WindowsStreamSecurityBindingElement are Windows-only at the
// BCL level; calling this on Linux throws PlatformNotSupportedException at runtime.
// Cross-platform callers should choose Transport = RemoteTcpCertificate.
public static Binding CreateAuxiliaryBinding(HistorianClientOptions options)
{
ArgumentNullException.ThrowIfNull(options);