예제 #1
0
        public RemoteValue GetCachedView(DebuggerApi.ValueFormat format)
        {
            GetCachedViewResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetCachedView(
                    new GetCachedViewRequest
                {
                    Value = grpcSbValue,
                    Format = format.ConvertTo <Debugger.Common.ValueFormat>()
                });
            }))
            {
                if (response.ValueInfo != null)
                {
                    RemoteValue addressOf = null;
                    if (response.AddressValue != null && response.AddressValue.Id != 0)
                    {
                        addressOf = valueFactory.Create(connection, response.AddressValue);
                        if (response.AddressInfo != null)
                        {
                            // gRpc server does not set |format| on |addressOf|, so use default.
                            addressOf = CreateCachedValue(addressOf, response.AddressInfo, null,
                                                          DebuggerApi.ValueFormat.Default);
                        }
                    }
                    return(CreateCachedValue(this, response.ValueInfo, addressOf, format));
                }
            }
            return(null);
        }
예제 #2
0
        public string GetSummary(DebuggerApi.ValueFormat format)
        {
            GetSummaryResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetSummary(
                    new GetSummaryRequest
                {
                    Value = grpcSbValue,
                    Format = format.ConvertTo <Debugger.Common.ValueFormat>()
                });
            }))
            {
                return(response.Summary);
            }
            return("");
        }