public void process(Model.ServiceRequest request, Model.ServiceResponse response)
        {
            if (request == null || request.requestObj == null)
            {
                response.errMessage = ReportServiceMessage.REQUEST_INVALID;
                response.returnCode = -1;
                return;
            }

            UpdateTravelDiaryRequest serviceRequest = (UpdateTravelDiaryRequest)request.requestObj;

            if (serviceRequest.diary.userId < 0 || serviceRequest.diary.diaryId < 0)
            {
                response.errMessage = ReportServiceMessage.USER_ID_OR_DIARY_ID_INVALID;
                response.returnCode = -1;
                return;
            }

            diary d = new diary();
            d.content = serviceRequest.diary.content;
            d.tag = serviceRequest.diary.tags;
            d.title = serviceRequest.diary.title;
            d.diaryID = (int)serviceRequest.diary.diaryId;

            Diary.updateDiary((int)serviceRequest.diary.diaryId, d);

            response.returnCode = 0;
        }
Exemple #2
0
 static void Main(string[] args)
 {
     ITimeControlledObject model = new Model();
     for (uint i = 0; i < c_uNumIterations; i++)
     {
         model.Trigger();
     }
     Console.ReadLine();
 }
Exemple #3
0
 IEnumerator RunModel()
 {
     const uint c_uNumIterations = 1000;
     DataModel.ITimeControlledObject model = new DataModel.Model();
     for (uint i = 0; i < c_uNumIterations; i++)
     {
         model.Trigger();
         yield return new WaitForSeconds(1);
     }
 }