public override Task <DereferenceResponse> Dereference( DereferenceRequest request, ServerCallContext context) { RemoteValue value = valueStore.GetObject(request.Value.Id); RemoteValue dereferenceResult = value.Dereference(); var response = new DereferenceResponse(); if (dereferenceResult != null) { response.DereferenceResult = GrpcFactoryUtils.CreateValue( dereferenceResult, valueStore.AddObject(dereferenceResult)); } return(Task.FromResult(response)); }
public RemoteValue Dereference() { DereferenceResponse response = null; if (connection.InvokeRpc(() => { response = client.Dereference(new DereferenceRequest { Value = grpcSbValue }); })) { if (response.DereferenceResult != null && response.DereferenceResult.Id != 0) { return(valueFactory.Create(connection, response.DereferenceResult)); } } return(null); }