Files
lmxopcua/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/DeferredProjectedNamespacePageSink.cs
T

21 lines
1.2 KiB
C#

using Opc.Ua;
using ZB.MOM.WW.OtOpcUa.Commons.OpcUa;
namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <summary>Resolves the currently bound SDK page sink without retaining a retired node manager.</summary>
public sealed class DeferredProjectedNamespacePageSink(DeferredAddressSpaceSink deferred) : IProjectedNamespacePageSink
{
public bool TryApply(NodeId parent, IReadOnlyList<ProjectedVariableDefinition> nodes, Func<bool> commit) =>
deferred.GetCapability<IProjectedNamespacePageSink>()?.TryApply(parent, nodes, commit) ?? false;
public bool TryApplyRootLeaf(NodeId anchorId, ProjectedVariableDefinition rootDefinition, Func<bool> commit) =>
deferred.GetCapability<IProjectedNamespacePageSink>()?.TryApplyRootLeaf(anchorId, rootDefinition, commit) ?? false;
public bool TryRemove(NodeId nodeId, ProjectedVariableDefinition expected) =>
deferred.GetCapability<IProjectedNamespacePageSink>()?.TryRemove(nodeId, expected) ?? false;
public bool TryRenewExact(NodeId nodeId, ProjectedVariableDefinition expected, ProjectedVariableDefinition replacement, Func<bool> commit) =>
deferred.GetCapability<IProjectedNamespacePageSink>()?.TryRenewExact(nodeId, expected, replacement, commit) ?? false;
}