Esempio n. 1
0
 public PageResponse GetUpdated(UpdateRequest request)
 {
     var result = new PageResponse();
     try
     {
         var user = UserInfoMaintenance.Instance[request.UserName];
         if (user != null && user.Token == request.UserToken)
         {
             result.Result = ResponseResult.Success;
             var example = PageExampleMaintenance.Instance.GetPageExample(request);
             if (example != null)
             {
                 example.Refresh();
                 result = example.Response.Clone() as PageResponse;
                 example.Response.Clear();
             }
         }
         else
         {
             result.Result = ResponseResult.UnAuthenticate;
         }
     }
     catch (Exception ex)
     {
         result.Result = ResponseResult.Fault;
         PageLogger.RecordErrorLog("GetUpdated", ex);
     }
     return result;
 }
Esempio n. 2
0
 public object Clone()
 {
     var result = new PageResponse();
     result.InstanceId = InstanceId;
     result.Result = Result;
     DoReadOperation(delegate()
     {
         foreach (var item in m_ControlResponses)
         {
             result.AddControlResponse(item.Clone() as ControlResponse);
         }
     });
     return result;
 }