public override ValueNodesProviderResult GetNodes(DbgEvaluationInfo evalInfo, DbgLanguage language, DbgEvaluationOptions evalOptions, DbgValueNodeEvaluationOptions nodeEvalOptions, DbgValueFormatterOptions nameFormatterOptions)
        {
            var recreateAllNodes = forceRecreateAllNodes;

            forceRecreateAllNodes = false;

            const CultureInfo?cultureInfo = null;
            var exceptions    = language.ExceptionsProvider.GetNodes(evalInfo, nodeEvalOptions);
            var returnValues  = debuggerSettings.ShowReturnValues ? language.ReturnValuesProvider.GetNodes(evalInfo, nodeEvalOptions) : Array.Empty <DbgValueNode>();
            var variables     = language.LocalsProvider.GetNodes(evalInfo, nodeEvalOptions, GetLocalsValueNodeOptions());
            var typeVariables = language.TypeVariablesProvider.GetNodes(evalInfo, nodeEvalOptions);

            var objectIds = dbgObjectIdService.GetObjectIds(evalInfo.Frame.Runtime);

            Array.Sort(objectIds, DbgObjectIdComparer.Instance);

            int count = exceptions.Length + returnValues.Length + objectIds.Length + variables.Length + typeVariables.Length;

            if (count == 0)
            {
                return(new ValueNodesProviderResult(Array.Empty <DbgValueNodeInfo>(), false));
            }
            var res = new DbgValueNodeInfo[count];
            int ri  = 0;

            for (int i = 0; i < exceptions.Length; i++, ri++)
            {
                ulong id        = (uint)i;
                var   exception = exceptions[i];
                if (exception.ImageName == PredefinedDbgValueNodeImageNames.StowedException)
                {
                    id |= 1UL << 32;
                }
                res[ri] = new DbgValueNodeInfo(exception, GetNextExceptionId(id), causesSideEffects: false);
            }
            for (int i = 0; i < returnValues.Length; i++, ri++)
            {
                res[ri] = new DbgValueNodeInfo(returnValues[i], GetNextReturnValueId(), causesSideEffects: false);
            }

            var objectIdNodes = language.ValueNodeFactory.Create(evalInfo, objectIds, nodeEvalOptions);

            Debug.Assert(objectIdNodes.Length == objectIds.Length);
            for (int i = 0; i < objectIdNodes.Length; i++, ri++)
            {
                var id = GetObjectIdNodeId(objectIds[i]);
                res[ri] = new DbgValueNodeInfo(objectIdNodes[i], id, causesSideEffects: false);
            }

            variables = GetSortedVariables(evalInfo, variables, nameFormatterOptions, cultureInfo);
            for (int i = 0; i < variables.Length; i++, ri++)
            {
                res[ri] = new DbgValueNodeInfo(variables[i].ValueNode, causesSideEffects: false);
            }

            for (int i = 0; i < typeVariables.Length; i++, ri++)
            {
                res[ri] = new DbgValueNodeInfo(typeVariables[i], GetNextTypeVariableId((uint)i), causesSideEffects: false);
            }

            if (res.Length != ri)
            {
                throw new InvalidOperationException();
            }

            return(new ValueNodesProviderResult(res, recreateAllNodes));
        }
        public override DbgValueNodeInfo[] GetNodes(DbgEvaluationContext context, DbgLanguage language, DbgStackFrame frame, DbgEvaluationOptions evalOptions, DbgValueNodeEvaluationOptions nodeEvalOptions)
        {
            var cancellationToken         = CancellationToken.None;
            const CultureInfo cultureInfo = null;
            var exceptions    = language.ExceptionsProvider.GetNodes(context, frame, nodeEvalOptions, cancellationToken);
            var returnValues  = language.ReturnValuesProvider.GetNodes(context, frame, nodeEvalOptions, cancellationToken);
            var variables     = language.LocalsProvider.GetNodes(context, frame, nodeEvalOptions, GetLocalsValueNodeOptions(), cancellationToken);
            var typeVariables = language.TypeVariablesProvider.GetNodes(context, frame, nodeEvalOptions, cancellationToken);

            var objectIds = dbgObjectIdService.GetObjectIds(frame.Runtime);

            Array.Sort(objectIds, DbgObjectIdComparer.Instance);

            int count = exceptions.Length + returnValues.Length + objectIds.Length + variables.Length + typeVariables.Length;

            if (count == 0)
            {
                return(Array.Empty <DbgValueNodeInfo>());
            }
            var res = new DbgValueNodeInfo[count];
            int ri  = 0;

            for (int i = 0; i < exceptions.Length; i++, ri++)
            {
                ulong id        = (uint)i;
                var   exception = exceptions[i];
                if (exception.ImageName == PredefinedDbgValueNodeImageNames.StowedException)
                {
                    id |= 1UL << 32;
                }
                res[ri] = new DbgValueNodeInfo(exception, GetNextExceptionId(id), causesSideEffects: false);
            }
            for (int i = 0; i < returnValues.Length; i++, ri++)
            {
                res[ri] = new DbgValueNodeInfo(returnValues[i], GetNextReturnValueId(), causesSideEffects: false);
            }

            var objectIdNodes = language.ValueNodeFactory.Create(context, frame, objectIds, nodeEvalOptions);

            Debug.Assert(objectIdNodes.Length == objectIds.Length);
            for (int i = 0; i < objectIdNodes.Length; i++, ri++)
            {
                var id = GetObjectIdNodeId(objectIds[i]);
                res[ri] = new DbgValueNodeInfo(objectIdNodes[i], id, causesSideEffects: false);
            }

            variables = GetSortedVariables(context, frame, variables, cultureInfo, cancellationToken);
            for (int i = 0; i < variables.Length; i++, ri++)
            {
                res[ri] = new DbgValueNodeInfo(variables[i].ValueNode, causesSideEffects: false);
            }

            for (int i = 0; i < typeVariables.Length; i++, ri++)
            {
                res[ri] = new DbgValueNodeInfo(typeVariables[i], GetNextTypeVariableId((uint)i), causesSideEffects: false);
            }

            if (res.Length != ri)
            {
                throw new InvalidOperationException();
            }
            return(res);
        }