64e3fbe035
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public members surfaced by commentchecker — resolves 5,847 of 5,869 issues (99.6%) across three /fixdocs passes.
23 lines
1.2 KiB
C#
23 lines
1.2 KiB
C#
namespace ZB.MOM.WW.OtOpcUa.Commons.OpcUa;
|
|
|
|
/// <summary>
|
|
/// Late-binding adapter that holds an inner <see cref="IServiceLevelPublisher"/> reference
|
|
/// swappable at runtime. Mirrors <see cref="DeferredAddressSpaceSink"/>: Akka actors resolve
|
|
/// the publisher at DI time, but the production <c>SdkServiceLevelPublisher</c> only exists
|
|
/// after <c>StandardServer.Start</c>. The Host's hosted service swaps the inner once the SDK
|
|
/// is up; until then writes route through <see cref="NullServiceLevelPublisher"/>.
|
|
/// </summary>
|
|
public sealed class DeferredServiceLevelPublisher : IServiceLevelPublisher
|
|
{
|
|
private volatile IServiceLevelPublisher _inner = NullServiceLevelPublisher.Instance;
|
|
|
|
/// <summary>Swap the underlying publisher. Pass null to revert to the Null no-op.</summary>
|
|
/// <param name="inner">The publisher implementation to use, or null to use the null publisher.</param>
|
|
public void SetInner(IServiceLevelPublisher? inner) =>
|
|
_inner = inner ?? NullServiceLevelPublisher.Instance;
|
|
|
|
/// <summary>Publishes a service level value to the inner publisher.</summary>
|
|
/// <param name="serviceLevel">The service level to publish.</param>
|
|
public void Publish(byte serviceLevel) => _inner.Publish(serviceLevel);
|
|
}
|