Opc.Ua.Client.MonitoredItem.SetResolvePathResult C# (CSharp) Method

SetResolvePathResult() public method

Updates the object with the results of a translate browse path request.
public SetResolvePathResult ( BrowsePathResult result, int index, DiagnosticInfoCollection diagnosticInfos, ResponseHeader responseHeader ) : void
result BrowsePathResult
index int
diagnosticInfos DiagnosticInfoCollection
responseHeader ResponseHeader
return void
        public void SetResolvePathResult( 
            BrowsePathResult          result,
            int                       index,
            DiagnosticInfoCollection  diagnosticInfos,         
            ResponseHeader            responseHeader)
        {
            ServiceResult error = null;

            if (StatusCode.IsBad(result.StatusCode))
            {
                error = ClientBase.GetResult(result.StatusCode, index, diagnosticInfos, responseHeader);
            }
            else
            {
                ResolvedNodeId = NodeId.Null;

                // update the node id.
                if (result.Targets.Count > 0)
                {
                    ResolvedNodeId = ExpandedNodeId.ToNodeId(result.Targets[0].TargetId, m_subscription.Session.NamespaceUris);
                }
            }

            m_status.SetResolvePathResult(result, error);
        }