Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public async Task <RemoteValue> CreateValueFromExpressionAsync(string name,
                                                                       string expression)
        {
            CreateValueFromExpressionResponse response = null;

            if (await connection.InvokeRpcAsync(async() =>
            {
                response = await client.CreateValueFromExpressionAsync(
                    new CreateValueFromExpressionRequest
                {
                    Value = grpcSbValue, Name = name, Expression = expression
                });
            }))
            {
                if (response.ExpressionResult != null && response.ExpressionResult.Id != 0)
                {
                    return(valueFactory.Create(connection, response.ExpressionResult));
                }
            }

            return(null);
        }
Ejemplo n.º 3
0
        public async Task <List <FrameInfoPair> > GetFramesWithInfoAsync(
            FrameInfoFlags fields, uint startIndex, uint maxCount)
        {
            var request = new GetFramesWithInfoRequest()
            {
                Thread     = grpcSbThread,
                Fields     = (uint)fields,
                StartIndex = startIndex,
                MaxCount   = maxCount
            };
            GetFramesWithInfoResponse response = null;

            if (await connection.InvokeRpcAsync(async delegate
            {
                response = await client.GetFramesWithInfoAsync(request);
            }))
            {
                return(ToFrameInfoPairList(response));
            }
            return(null);
        }