예제 #1
0
        public override Task <GetFrameAtIndexResponse> GetFrameAtIndex(
            GetFrameAtIndexRequest request, ServerCallContext context)
        {
            var thread   = threadStore.GetObject(request.Thread.Id);
            var frame    = thread.GetFrameAtIndex(request.Index);
            var response = new GetFrameAtIndexResponse();

            response.Frame = CreateGrpcSbFrame(frame);
            return(Task.FromResult(response));
        }
예제 #2
0
        public RemoteFrame GetFrameAtIndex(uint index)
        {
            var request = new GetFrameAtIndexRequest()
            {
                Thread = grpcSbThread,
                Index  = index
            };
            GetFrameAtIndexResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetFrameAtIndex(request);
            }))
            {
                return(frameFactory.Create(connection, response.Frame));
            }
            return(null);
        }