public void QueryQuestions_Process(int seqid, TProtocol iprot, TProtocol oprot) { QueryQuestions_args args = new QueryQuestions_args(); args.Read(iprot); iprot.ReadMessageEnd(); QueryQuestions_result result = new QueryQuestions_result(); try { result.Success = iface_.QueryQuestions(args.CourseId, args.TypeId, args.DiffType, args.PaperTypeId, args.KpId, args.CpId, args.PageIndex, args.PageSize); oprot.WriteMessageBegin(new TMessage("QueryQuestions", TMessageType.Reply, seqid)); result.Write(oprot); } catch (TTransportException) { throw; } catch (Exception ex) { Console.Error.WriteLine("Error occurred in processor:"); Console.Error.WriteLine(ex.ToString()); TApplicationException x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error."); oprot.WriteMessageBegin(new TMessage("QueryQuestions", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public void send_QueryQuestions(short courseId, short typeId, short diffType, short paperTypeId, short kpId, short cpId, short pageIndex, short pageSize) #endif { oprot_.WriteMessageBegin(new TMessage("QueryQuestions", TMessageType.Call, seqid_)); QueryQuestions_args args = new QueryQuestions_args(); args.CourseId = courseId; args.TypeId = typeId; args.DiffType = diffType; args.PaperTypeId = paperTypeId; args.KpId = kpId; args.CpId = cpId; args.PageIndex = pageIndex; args.PageSize = pageSize; args.Write(oprot_); oprot_.WriteMessageEnd(); #if SILVERLIGHT return(oprot_.Transport.BeginFlush(callback, state)); #else oprot_.Transport.Flush(); #endif }