using System; using Aging.ResourceContracts; namespace Aging.Infrastructure.Broker { /// /// DeviceBroker 命名管道服务名约定:aging.{brokerId}.v{协议主版本} /// (V3.0 §13:服务名含 Station/Broker/协议主版本)。 /// public static class BrokerPipeName { public static string For(string brokerId) { if (string.IsNullOrWhiteSpace(brokerId)) throw new ArgumentException("brokerId 不能为空", nameof(brokerId)); return $"aging.{brokerId.Trim().ToLowerInvariant()}.v{BrokerIpc.ProtocolVersion}"; } } }