Exemplo n.º 1
0
 public IRolePermissionStateEvent GetStateEvent(string id, long version)
 {
     try {
         var idObj = RolePermissionsControllerUtils.ParseIdString(id);
         return(_rolePermissionApplicationService.GetStateEvent(idObj, version));
     } catch (Exception ex) { var response = RolePermissionsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Exemplo n.º 2
0
 public RolePermissionStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = RolePermissionsControllerUtils.ParseIdString(id);
         var state = (RolePermissionState)_rolePermissionApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new RolePermissionStateDto(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = RolePermissionsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }