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); }
private RemoteValue CreateCachedValue( RemoteValue remoteProxy, GrpcValueInfo info, RemoteValue addressOf, DebuggerApi.ValueFormat format) => cachedValueFactory.Create( remoteProxy, addressOf, info.Type != null && info.Type.Id != 0 ? typeFactory.Create(connection, info.Type) : null, info.ExpressionPath, info.HasExpressionPath, info.NumChildren, info.Summary, info.TypeName, info.Value, EnumUtil.ConvertTo <DebuggerApi.ValueType>(info.ValueType), info.IsPointerType, format, info.ByteSize);
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(""); }