Exemplo n.º 1
0
        public override Task <GetValueForExpressionPathResponse> GetValueForExpressionPath(
            GetValueForExpressionPathRequest request, ServerCallContext context)
        {
            var value      = valueStore.GetObject(request.Value.Id);
            var childValue = value.GetValueForExpressionPath(request.ExpressionPath);
            GetValueForExpressionPathResponse response = new GetValueForExpressionPathResponse();

            if (childValue != null)
            {
                response.Value = GrpcFactoryUtils.CreateValue(
                    childValue, valueStore.AddObject(childValue));
            }
            return(Task.FromResult(response));
        }
Exemplo n.º 2
0
        public RemoteValue GetValueForExpressionPath(string expressionPath)
        {
            GetValueForExpressionPathResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetValueForExpressionPath(
                    new GetValueForExpressionPathRequest
                {
                    Value = grpcSbValue,
                    ExpressionPath = expressionPath
                });
            }))
            {
                if (response.Value != null && response.Value.Id != 0)
                {
                    return(valueFactory.Create(connection, response.Value));
                }
            }
            return(null);
        }