コード例 #1
0
 public IOrganizationStructureStateEvent GetStateEvent(string id, long version)
 {
     try {
         var idObj = OrganizationStructuresControllerUtils.ParseIdString(id);
         return(_organizationStructureApplicationService.GetStateEvent(idObj, version));
     } catch (Exception ex) { var response = OrganizationStructuresControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #2
0
 public OrganizationStructureStateCreatedOrMergePatchedOrDeletedDto GetStateEvent(string id, long version)
 {
     try {
         var idObj = OrganizationStructuresControllerUtils.ParseIdString(id);
         var conv  = new OrganizationStructureStateEventDtoConverter();
         var se    = _organizationStructureApplicationService.GetEvent(idObj, version);
         return(se == null ? null : conv.ToOrganizationStructureStateEventDto(se));
     } catch (Exception ex) { var response = OrganizationStructuresControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #3
0
 public IOrganizationStructureStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = OrganizationStructuresControllerUtils.ParseIdString(id);
         var state = _organizationStructureApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new OrganizationStructureStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = OrganizationStructuresControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }