Browse() 공개 메소드

Invokes the Browse service.
public Browse ( RequestHeader requestHeader, ViewDescription view, NodeId nodeToBrowse, uint maxResultsToReturn, BrowseDirection browseDirection, NodeId referenceTypeId, bool includeSubtypes, uint nodeClassMask, byte &continuationPoint, ReferenceDescriptionCollection &references ) : ResponseHeader
requestHeader RequestHeader The request header.
view ViewDescription The view to browse.
nodeToBrowse NodeId The node to browse.
maxResultsToReturn uint The maximum number of returned values.
browseDirection BrowseDirection The browse direction.
referenceTypeId NodeId The reference type id.
includeSubtypes bool If set to true the subtypes of the ReferenceType will be included in the browse.
nodeClassMask uint The node class mask.
continuationPoint byte The continuation point.
references ReferenceDescriptionCollection The list of node references.
리턴 ResponseHeader
예제 #1
0
 public static ReferenceDescriptionCollection Browse(Session session, BrowseDescription nodeToBrowse, bool throwOnError)
 {
     try
       {
     var descriptionCollection = new ReferenceDescriptionCollection();
     var nodesToBrowse = new BrowseDescriptionCollection { nodeToBrowse };
     BrowseResultCollection results;
     DiagnosticInfoCollection diagnosticInfos;
     session.Browse(null, null, 0U, nodesToBrowse, out results, out diagnosticInfos);
     ClientBase.ValidateResponse(results, nodesToBrowse);
     ClientBase.ValidateDiagnosticInfos(diagnosticInfos, nodesToBrowse);
     while (!StatusCode.IsBad(results[0].StatusCode))
     {
       for (var index = 0; index < results[0].References.Count; ++index)
     descriptionCollection.Add(results[0].References[index]);
       if (results[0].References.Count == 0 || results[0].ContinuationPoint == null)
     return descriptionCollection;
       var continuationPoints = new ByteStringCollection();
       continuationPoints.Add(results[0].ContinuationPoint);
       session.BrowseNext(null, false, continuationPoints, out results, out diagnosticInfos);
       ClientBase.ValidateResponse(results, continuationPoints);
       ClientBase.ValidateDiagnosticInfos(diagnosticInfos, continuationPoints);
     }
     throw new ServiceResultException(results[0].StatusCode);
       }
       catch (Exception ex)
       {
     if (throwOnError)
       throw new ServiceResultException(ex, 2147549184U);
     return null;
       }
 }
예제 #2
0
파일: Program.cs 프로젝트: yuriik83/UA-.NET
        static void HistoryReadProcessed(Session session)
        {
            // translate browse paths.
            IList<NodeOfInterest> nodeIds = GetNodeIds(session, Opc.Ua.Objects.ObjectsFolder, 
                VariableBrowsePaths.ToArray());

            DiagnosticInfoCollection diagnosticInfos;

            NodeId aggregateNodeId = null;

            RequestHeader rh = null;
            ViewDescription vd = null;
            ReferenceDescriptionCollection references;
            byte[] cp;

            //Get the list of avalilable aggregate functions:
            session.Browse(
                rh, 
                vd, 
                Opc.Ua.ObjectIds.Server_ServerCapabilities_AggregateFunctions,
                1000,
                BrowseDirection.Forward, 
                ReferenceTypeIds.Aggregates, 
                false, 
                0, 
                out cp, 
                out references);

            Console.WriteLine("{0} aggregates are detected:", references.Count);

            //Print the list of avalible aggregates:
            int i = 0;
            foreach (ReferenceDescription rd in references)
            {
                i++;
                Console.WriteLine("{0}. {1} {2}", i, rd.BrowseName, rd.NodeId.Identifier.ToString());
            }

            //Select aggregate function:
            Console.WriteLine("\nEnter aggregate number: ");
            string str = Console.ReadLine();

            i = System.Int16.Parse(str);

            if (i > 0 && i <= references.Count)
            {
                aggregateNodeId = ExpandedNodeId.ToNodeId(references[i - 1].NodeId, session.NamespaceUris);
            }

            //Prepare arguments to pass to read processed history
            ReadProcessedDetails readDetails = new ReadProcessedDetails();

            readDetails.StartTime = new DateTime(2008, 1, 1, 12, 0, 0);
            readDetails.EndTime = new DateTime(2008, 1, 1, 12, 0, 12);

            readDetails.AggregateType = new NodeIdCollection(nodeIds.Count);
            for (int x = 0; x < nodeIds.Count; x++)
            {
                readDetails.AggregateType.Add (aggregateNodeId);
            }

            readDetails.ProcessingInterval = 500; //500 milliseconds

            ExtensionObject eo = new ExtensionObject(readDetails.TypeId, readDetails);

            HistoryReadValueIdCollection idCollection = new HistoryReadValueIdCollection();
            for (int ii = 0; ii < nodeIds.Count; ii++)
            {
                HistoryReadValueId readValueId = new HistoryReadValueId();
                readValueId.NodeId = nodeIds[ii].NodeId;
                readValueId.Processed = true;
                idCollection.Add(readValueId);
            }

            HistoryReadResultCollection historyReadResults;

            //Read processed history:
            ResponseHeader responseHeader =
                session.HistoryRead(null, eo, TimestampsToReturn.Both, true,
                idCollection, out historyReadResults, out diagnosticInfos);

            //Print results:
            for (int ii = 0; ii < historyReadResults.Count; ii++)
            {
                HistoryReadResult historyReadResult = historyReadResults[ii];
                ServiceResult result = Session.GetResult(historyReadResult.StatusCode, ii, diagnosticInfos, responseHeader);
                
                HistoryData historyData = null;
                DataValueCollection dataValues = null;
                if ( !(historyReadResult.HistoryData == null) )
                {
                    historyData = ExtensionObject.ToEncodeable(historyReadResult.HistoryData) as HistoryData;
                    if (historyData == null)
                        dataValues = null;
                    else
                        dataValues = historyData.DataValues;
                }

                Console.WriteLine("\nHistoryRead result code for {0}:  {1}", VariableBrowsePaths[ii], result.StatusCode.ToString());

                if (dataValues == null)
                {
                    Console.WriteLine("dataValues == null");
                    continue;
                }

                for (int jj = 0; jj < dataValues.Count; jj++)
                {
                    DataValue dataValue = dataValues[jj];
                    if (dataValue == null)
                        continue;

                    // write value.
                    Console.WriteLine("{0}: V={1}, Q={2}, SrvT={3}, SrcT={4}", jj,
                        dataValue.Value == null ? "null" : dataValue.Value.ToString(),
                        dataValue.StatusCode.ToString(),
                        dataValue.ServerTimestamp, dataValue.SourceTimestamp);
                }
            }
        }
예제 #3
0
파일: Program.cs 프로젝트: yuriik83/UA-.NET
        static void Browse(Session session)
        {
            DiagnosticInfoCollection diagnosticInfos;

            BrowseDescriptionCollection bc = new BrowseDescriptionCollection();
            BrowseDescription bd = new BrowseDescription();
            bd.BrowseDirection = BrowseDirection.Forward;
            NodeId nodeId = Opc.Ua.Objects.ObjectsFolder;

            do
            {
                Console.WriteLine("\n Enter nodeId to Browse (or q to exit)");
                string s = Console.ReadLine();
                if (s == "q")
                    break;
                if (s.Length == 0)
                {
                    nodeId = Opc.Ua.Objects.ObjectsFolder;
                }
                else
                    nodeId = new NodeId(s);
                bc.Clear();

                bd.NodeId = nodeId;

                bc.Add(bd);

                BrowseResultCollection results;

                ResponseHeader rh =
                    session.Browse(null, null, 100, bc, out results, out diagnosticInfos);
                
                foreach ( BrowseResult res in results)
                {
                    foreach (ReferenceDescription rdc in res.References)
                    {
                        Console.WriteLine(String.Format(" Node = {0} (namespace {1}) {2}", rdc.NodeId.ToString(),rdc.NodeId.NamespaceIndex, Environment.NewLine));
                    }
                }
            } while (true);

        }
예제 #4
0
            private async Task FindObjects(Opc.Ua.Client.Session session, NodeId nodeid)
            {
                if (session == null)
                {
                    return;
                }

                try
                {
                    ReferenceDescriptionCollection references;
                    Byte[] continuationPoint;

                    if (NodeIdsFromObjects.Contains(nodeid.ToString()))
                    {
                        return;
                    }

                    session.Browse(
                        null,
                        null,
                        nodeid,
                        0u,
                        BrowseDirection.Forward,
                        ReferenceTypeIds.HierarchicalReferences,
                        true,
                        (uint)NodeClass.Variable | (uint)NodeClass.Object,
                        out continuationPoint,
                        out references);

                    foreach (var rd in references)
                    {
                        Log(conn_name + " - " + rd.NodeId + ", " + rd.DisplayName + ", " + rd.BrowseName + ", " + rd.NodeClass);
                        if (rd.NodeClass == NodeClass.Variable && !NodeIds.Contains(rd.NodeId.ToString()))
                        {
                            NodeIds.Add(rd.NodeId.ToString());
                            ListMon.Add(
                                new MonitoredItem()
                            {
                                DisplayName      = rd.DisplayName.ToString(),
                                StartNodeId      = rd.NodeId.ToString(),
                                SamplingInterval = System.Convert.ToInt32(System.Convert.ToDouble(OPCUA_conn.autoCreateTagSamplingInterval) * 1000),
                                QueueSize        = System.Convert.ToUInt32(OPCUA_conn.autoCreateTagQueueSize),
                                MonitoringMode   = MonitoringMode.Reporting,
                                DiscardOldest    = true,
                                AttributeId      = Attributes.Value
                            });
                        }
                        else
                        if (rd.NodeClass == NodeClass.Object)
                        {
                            NodeIdsFromObjects.Add(nodeid.ToString());
                            await FindObjects(session, ExpandedNodeId.ToNodeId(rd.NodeId, session.NamespaceUris));

                            Thread.Yield();
                            //Thread.Sleep(1);
                            //await Task.Delay(1);
                        }
                    }
                }
                catch (Exception ex)
                {
                    Log(conn_name + " - " + ex.Message);
                }
            }
        /// <summary>
        /// Browses the address space and returns the references found.
        /// </summary>
        public static ReferenceDescriptionCollection Browse(Session session, ViewDescription view, BrowseDescription nodeToBrowse, bool throwOnError)
        {
            try
            {
                ReferenceDescriptionCollection references = new ReferenceDescriptionCollection();

                // construct browse request.
                BrowseDescriptionCollection nodesToBrowse = new BrowseDescriptionCollection();
                nodesToBrowse.Add(nodeToBrowse);

                // start the browse operation.
                BrowseResultCollection results = null;
                DiagnosticInfoCollection diagnosticInfos = null;

                session.Browse(
                    null,
                    view,
                    0,
                    nodesToBrowse,
                    out results,
                    out diagnosticInfos);

                ClientBase.ValidateResponse(results, nodesToBrowse);
                ClientBase.ValidateDiagnosticInfos(diagnosticInfos, nodesToBrowse);

                do
                {
                    // check for error.
                    if (StatusCode.IsBad(results[0].StatusCode))
                    {
                        throw new ServiceResultException(results[0].StatusCode);
                    }

                    // process results.
                    for (int ii = 0; ii < results[0].References.Count; ii++)
                    {
                        references.Add(results[0].References[ii]);
                    }

                    // check if all references have been fetched.
                    if (results[0].References.Count == 0 || results[0].ContinuationPoint == null)
                    {
                        break;
                    }

                    // continue browse operation.
                    ByteStringCollection continuationPoints = new ByteStringCollection();
                    continuationPoints.Add(results[0].ContinuationPoint);

                    session.BrowseNext(
                        null,
                        false,
                        continuationPoints,
                        out results,
                        out diagnosticInfos);

                    ClientBase.ValidateResponse(results, continuationPoints);
                    ClientBase.ValidateDiagnosticInfos(diagnosticInfos, continuationPoints);
                }
                while (true);

                //return complete list.
                return references;
            }
            catch (Exception exception)
            {
                if (throwOnError)
                {
                    throw new ServiceResultException(exception, StatusCodes.BadUnexpectedError);
                }

                return null;
            }
        }
        /// <summary>
        /// Browses the address space and returns the references found.
        /// </summary>
        public static ReferenceDescriptionCollection Browse(Session session, ViewDescription view, BrowseDescriptionCollection nodesToBrowse, bool throwOnError)
        {
            try
            {
                ReferenceDescriptionCollection references = new ReferenceDescriptionCollection();
                BrowseDescriptionCollection unprocessedOperations = new BrowseDescriptionCollection();

                while (nodesToBrowse.Count > 0)
                {
                    // start the browse operation.
                    BrowseResultCollection results = null;
                    DiagnosticInfoCollection diagnosticInfos = null;

                    session.Browse(
                        null,
                        view,
                        0,
                        nodesToBrowse,
                        out results,
                        out diagnosticInfos);

                    ClientBase.ValidateResponse(results, nodesToBrowse);
                    ClientBase.ValidateDiagnosticInfos(diagnosticInfos, nodesToBrowse);

                    ByteStringCollection continuationPoints = new ByteStringCollection();

                    for (int ii = 0; ii < nodesToBrowse.Count; ii++)
                    {
                        // check for error.
                        if (StatusCode.IsBad(results[ii].StatusCode))
                        {
                            // this error indicates that the server does not have enough simultaneously active 
                            // continuation points. This request will need to be resent after the other operations
                            // have been completed and their continuation points released.
                            if (results[ii].StatusCode == StatusCodes.BadNoContinuationPoints)
                            {
                                unprocessedOperations.Add(nodesToBrowse[ii]);
                            }

                            continue;
                        }
                        
                        // check if all references have been fetched.
                        if (results[ii].References.Count == 0)
                        {
                            continue;
                        }

                        // save results.
                        references.AddRange(results[ii].References);

                        // check for continuation point.
                        if (results[ii].ContinuationPoint != null)
                        {
                            continuationPoints.Add(results[ii].ContinuationPoint);
                        }
                    }

                    // process continuation points.
                    ByteStringCollection revisedContiuationPoints = new ByteStringCollection();

                    while (continuationPoints.Count > 0)
                    {
                        // continue browse operation.
                        session.BrowseNext(
                            null,
                            false,
                            continuationPoints,
                            out results,
                            out diagnosticInfos);

                        ClientBase.ValidateResponse(results, continuationPoints);
                        ClientBase.ValidateDiagnosticInfos(diagnosticInfos, continuationPoints);

                        for (int ii = 0; ii < continuationPoints.Count; ii++)
                        {
                            // check for error.
                            if (StatusCode.IsBad(results[ii].StatusCode))
                            {
                                continue;
                            }

                            // check if all references have been fetched.
                            if (results[ii].References.Count == 0)
                            {
                                continue;
                            }

                            // save results.
                            references.AddRange(results[ii].References);

                            // check for continuation point.
                            if (results[ii].ContinuationPoint != null)
                            {
                                revisedContiuationPoints.Add(results[ii].ContinuationPoint);
                            }
                        }

                        // check if browsing must continue;
                        revisedContiuationPoints = continuationPoints;
                    }

                    // check if unprocessed results exist.
                    nodesToBrowse = unprocessedOperations;
                }

                // return complete list.
                return references;
            }
            catch (Exception exception)
            {
                if (throwOnError)
                {
                    throw new ServiceResultException(exception, StatusCodes.BadUnexpectedError);
                }

                return null;
            }
        }
예제 #7
0
        /// <summary>
        /// Finds the targets for the specified reference.
        /// </summary>
        private static List<NodeId> FindTargetOfReference(Session session, List<NodeId> nodeIds, NodeId referenceTypeId, bool throwOnError)
        {
            try
            {
                // construct browse request.
                BrowseDescriptionCollection nodesToBrowse = new BrowseDescriptionCollection();

                for (int ii = 0; ii < nodeIds.Count; ii++)
                {
                    BrowseDescription nodeToBrowse = new BrowseDescription();
                    nodeToBrowse.NodeId = nodeIds[ii];
                    nodeToBrowse.BrowseDirection = BrowseDirection.Forward;
                    nodeToBrowse.ReferenceTypeId = referenceTypeId;
                    nodeToBrowse.IncludeSubtypes = false;
                    nodeToBrowse.NodeClassMask = 0;
                    nodeToBrowse.ResultMask = (uint)BrowseResultMask.None;
                    nodesToBrowse.Add(nodeToBrowse);
                }

                // start the browse operation.
                BrowseResultCollection results = null;
                DiagnosticInfoCollection diagnosticInfos = null;

                session.Browse(
                    null,
                    null,
                    1,
                    nodesToBrowse,
                    out results,
                    out diagnosticInfos);

                ClientBase.ValidateResponse(results, nodesToBrowse);
                ClientBase.ValidateDiagnosticInfos(diagnosticInfos, nodesToBrowse);

                List<NodeId> targetIds = new List<NodeId>();
                ByteStringCollection continuationPoints = new ByteStringCollection();

                for (int ii = 0; ii < nodeIds.Count; ii++)
                {
                    targetIds.Add(null);

                    // check for error.
                    if (StatusCode.IsBad(results[ii].StatusCode))
                    {
                        continue;
                    }

                    // check for continuation point.
                    if (results[ii].ContinuationPoint != null && results[ii].ContinuationPoint.Length > 0)
                    {
                        continuationPoints.Add(results[ii].ContinuationPoint);
                    }

                    // get the node id.
                    if (results[ii].References.Count > 0)
                    {
                        if (NodeId.IsNull(results[ii].References[0].NodeId) || results[ii].References[0].NodeId.IsAbsolute)
                        {
                            continue;
                        }

                        targetIds[ii] = (NodeId)results[ii].References[0].NodeId;
                    }
                }

                // release continuation points.
                if (continuationPoints.Count > 0)
                {
                    session.BrowseNext(
                        null,
                        true,
                        continuationPoints,
                        out results,
                        out diagnosticInfos);

                    ClientBase.ValidateResponse(results, nodesToBrowse);
                    ClientBase.ValidateDiagnosticInfos(diagnosticInfos, nodesToBrowse);
                }

                //return complete list.
                return targetIds;
            }
            catch (Exception exception)
            {
                if (throwOnError)
                {
                    throw new ServiceResultException(exception, StatusCodes.BadUnexpectedError);
                }

                return null;
            }
        }
예제 #8
0
        /// <summary>
        /// Fetches the references for the node.
        /// </summary>
        private List<ReferenceDescription> Browse(Session session, NodeId nodeId)
        {
            List<ReferenceDescription> references = new List<ReferenceDescription>();

            // specify the references to follow and the fields to return.
            BrowseDescription nodeToBrowse = new BrowseDescription();

            nodeToBrowse.NodeId = nodeId;
            nodeToBrowse.ReferenceTypeId = ReferenceTypeIds.References;
            nodeToBrowse.IncludeSubtypes = true;
            nodeToBrowse.BrowseDirection = BrowseDirection.Both;
            nodeToBrowse.NodeClassMask = 0;
            nodeToBrowse.ResultMask = (uint)BrowseResultMask.All;

            BrowseDescriptionCollection nodesToBrowse = new BrowseDescriptionCollection();
            nodesToBrowse.Add(nodeToBrowse);
            
            // start the browse operation.
            BrowseResultCollection results = null;
            DiagnosticInfoCollection diagnosticInfos = null;

            ResponseHeader responseHeader = session.Browse(
                null,
                null,
                2,
                nodesToBrowse,
                out results,
                out diagnosticInfos);

            // these do sanity checks on the result - make sure response matched the request.
            ClientBase.ValidateResponse(results, nodesToBrowse);
            ClientBase.ValidateDiagnosticInfos(diagnosticInfos, nodesToBrowse);

            // check status.
            if (StatusCode.IsBad(results[0].StatusCode))
            {
                // embed the diagnostic information in a exception.
                throw ServiceResultException.Create(results[0].StatusCode, 0, diagnosticInfos, responseHeader.StringTable);
            }

            // add first batch.
            references.AddRange(results[0].References);

            // check if server limited the results.
            while (results[0].ContinuationPoint != null && results[0].ContinuationPoint.Length > 0)
            {
                ByteStringCollection continuationPoints = new ByteStringCollection();
                continuationPoints.Add(results[0].ContinuationPoint);

                // continue browse operation.
                responseHeader = session.BrowseNext(
                    null,
                    false,
                    continuationPoints,
                    out results,
                    out diagnosticInfos);

                ClientBase.ValidateResponse(results, continuationPoints);
                ClientBase.ValidateDiagnosticInfos(diagnosticInfos, continuationPoints);
                
                // check status.
                if (StatusCode.IsBad(results[0].StatusCode))
                {
                    // embed the diagnostic information in a exception.
                    throw ServiceResultException.Create(results[0].StatusCode, 0, diagnosticInfos, responseHeader.StringTable);
                }

                // add next batch.
                references.AddRange(results[0].References);
            }

            return references;
        }
예제 #9
0
        /// <summary>
        /// Sends the browse request to the server.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <param name="nodesToBrowse">The nodes to browse.</param>
        /// <returns></returns>
        private BrowseResultCollection BrowseBlock(Session session, BrowseDescriptionCollection nodesToBrowse)
        {
            try
            {
                // Utils.Trace("Browsing {0} Nodes", nodesToBrowse.Count);

                ViewDescription view = new ViewDescription();
                Dictionary<int,BrowseResult> combinedResults = new Dictionary<int, BrowseResult>();

                // initialize the table of indexes used to correlate results.   
                BrowseDescriptionCollection browseOperations = nodesToBrowse;             
                List<int> browseIndexes = new List<int>();

                for (int ii = 0; ii < nodesToBrowse.Count; ii++)
                {
                    browseIndexes.Add(ii);
                }

                BrowseDescriptionCollection unprocessedOperations = new BrowseDescriptionCollection();
                List<int> unprocessedBrowseIndexes = new List<int>();

                while (browseOperations.Count > 0)
                {
                    // start the browse operation.
                    BrowseResultCollection results = null;
                    DiagnosticInfoCollection diagnosticInfos = null;

                    session.Browse(
                        null,
                        view,
                        0,
                        browseOperations,
                        out results,
                        out diagnosticInfos);

                    ClientBase.ValidateResponse(results, browseOperations);
                    ClientBase.ValidateDiagnosticInfos(diagnosticInfos, browseOperations);

                    unprocessedOperations.Clear();
                    unprocessedBrowseIndexes.Clear();

                    ByteStringCollection continuationPoints = new ByteStringCollection();
                    List<int> continuationPointIndexes = new List<int>();

                    for (int ii = 0; ii < browseOperations.Count; ii++)
                    {
                        int index = browseIndexes[ii];

                        // Utils.Trace("{0}/{1}/{2}", browseOperations[ii].NodeId, browseOperations[ii].ReferenceTypeId, results[ii].References.Count);

                        // look up results.
                        BrowseResult combinedResult = null;

                        if (!combinedResults.TryGetValue(index, out combinedResult))
                        {
                            combinedResults[index] = combinedResult = new BrowseResult();
                        }

                        // check for error.
                        if (StatusCode.IsBad(results[ii].StatusCode))
                        {
                            // this error indicates that the server does not have enough simultaneously active 
                            // continuation points. This request will need to be resent after the other operations
                            // have been completed and their continuation points released.
                            if (results[ii].StatusCode == StatusCodes.BadNoContinuationPoints)
                            {
                                unprocessedOperations.Add(browseOperations[ii]);
                                unprocessedBrowseIndexes.Add(index);
                                continue;
                            }

                            // save error.
                            if (StatusCode.IsGood(combinedResult.StatusCode))
                            {
                                combinedResult.StatusCode = results[ii].StatusCode;
                            }

                            continue;
                        }

                        // check if all references have been fetched.
                        if (results[ii].References.Count == 0)
                        {
                            continue;
                        }

                        // save results.
                        combinedResult.References.AddRange(results[ii].References);

                        // check for continuation point.
                        if (results[ii].ContinuationPoint != null && results[ii].ContinuationPoint.Length > 0)
                        {
                            continuationPoints.Add(results[ii].ContinuationPoint);
                            continuationPointIndexes.Add(index);
                        }
                    }

                    // process continuation points.
                    ByteStringCollection revisedContinuationPoints = new ByteStringCollection();
                    List<int> revisedContinuationPointIndexes = new List<int>();

                    while (continuationPoints.Count > 0)
                    {
                        bool releaseContinuationPoints = false;

                        // continue browse operation.
                        session.BrowseNext(
                            null,
                            releaseContinuationPoints,
                            continuationPoints,
                            out results,
                            out diagnosticInfos);

                        ClientBase.ValidateResponse(results, continuationPoints);
                        ClientBase.ValidateDiagnosticInfos(diagnosticInfos, continuationPoints);

                        revisedContinuationPoints.Clear();
                        revisedContinuationPointIndexes.Clear();

                        for (int ii = 0; ii < continuationPoints.Count; ii++)
                        {
                            int index = continuationPointIndexes[ii];

                            // look up results.
                            BrowseResult combinedResult = null;

                            if (!combinedResults.TryGetValue(index, out combinedResult))
                            {
                                combinedResults[index] = new BrowseResult();
                            }

                            // check for error.
                            if (StatusCode.IsBad(results[ii].StatusCode))
                            {
                                // save error.
                                if (StatusCode.IsGood(combinedResult.StatusCode))
                                {
                                    combinedResult.StatusCode = results[ii].StatusCode;
                                }

                                continue;
                            }

                            // check if all references have been fetched.
                            if (results[ii].References.Count == 0)
                            {
                                continue;
                            }

                            // save results.
                            combinedResult.References.AddRange(results[ii].References);

                            // check for continuation point.
                            if (results[ii].ContinuationPoint != null && results[ii].ContinuationPoint.Length > 0)
                            {
                                revisedContinuationPoints.Add(results[ii].ContinuationPoint);
                                revisedContinuationPointIndexes.Add(index);
                            }
                        }

                        // check if browsing must continue;
                        continuationPoints = revisedContinuationPoints;
                        continuationPointIndexes = revisedContinuationPointIndexes;
                    }

                    // check if unprocessed results exist.
                    browseOperations = unprocessedOperations;
                    browseIndexes = unprocessedBrowseIndexes;
                }

                // reconstruct list of combined results.
                BrowseResultCollection finalResults = new BrowseResultCollection();

                for (int ii = 0; ii < nodesToBrowse.Count; ii++)
                {
                    BrowseResult combinedResult = null;

                    if (!combinedResults.TryGetValue(ii, out combinedResult))
                    {
                        combinedResult = new BrowseResult();
                    }

                    finalResults.Add(combinedResult);
                }

                // return complete list.
                return finalResults;
            }
            catch (Exception e)
            {
                throw ComUtils.CreateComException(e, ResultIds.E_FAIL);
            }
        }