Exemple #1
0
        public override Task <GetStopReasonResponse> GetStopReason(GetStopReasonRequest request,
                                                                   ServerCallContext context)
        {
            var thread         = threadStore.GetObject(request.Thread.Id);
            var grpcStopReason = GetGrpcStopReason(thread.GetStopReason());

            return(Task.FromResult(new GetStopReasonResponse {
                StopReason = grpcStopReason
            }));
        }
Exemple #2
0
        public StopReason GetStopReason()
        {
            var request = new GetStopReasonRequest()
            {
                Thread = grpcSbThread
            };
            GetStopReasonResponse response = null;

            if (connection.InvokeRpc(() =>
            {
                response = client.GetStopReason(request);
            }))
            {
                return(GetStopReason(response.StopReason));
            }
            return(StopReason.INVALID);
        }