public async Task <RemoteValue> EvaluateExpressionAsync(string text) { EvaluateExpressionResponse response = null; if (await connection.InvokeRpcAsync(async delegate { response = await client.EvaluateExpressionAsync( new EvaluateExpressionRequest() { Frame = grpcSbFrame, Expression = text }); })) { if (response.Value != null && response.Value.Id != 0) { return(valueFactory.Create(connection, response.Value)); } } return(null); }
public List <RemoteValue> GetChildren(uint offset, uint count) { var values = Enumerable.Repeat <RemoteValue>(null, (int)count).ToList(); GetChildrenResponse response = null; if (connection.InvokeRpc(() => { response = client.GetChildren( new GetChildrenRequest { Value = grpcSbValue, Offset = offset, Count = count }); })) { for (uint n = 0; n < count; ++n) { GrpcSbValue sbValue; if (response.Children != null && response.Children.TryGetValue(n + offset, out sbValue) && sbValue.Id != 0) { values[(int)n] = valueFactory.Create(connection, sbValue); } } } return(values); }