Exemplo n.º 1
0
 public static IEnumerable <CalendarOverview> Query(
     this IEnumerable <ReadModels.CalendarOverview> allCalendars,
     GetCalendars query
     )
 {
     return(allCalendars);
 }
Exemplo n.º 2
0
 /// <summary> Gets paginated set of iCalendar instances.</summary>
 /// <exception cref="InvalidOperationException"> Thrown when the requested operation is invalid.</exception>
 /// <exception cref="ApplicationException"> Thrown when an Application error condition occurs.</exception>
 /// <param name="request"> The request to get.</param>
 /// <returns>A list of found VCALENDAR objects per result page; otherwise an empty list.</returns>
 public List<VCALENDAR> Get(GetCalendars request)
 {
     try
     {
         return request.Page != null && request.Size != null
             ? repository.Get((request.Page.Value - 1)*request.Size.Value, request.Size.Value).ToList()
             : repository.Get().ToList();
     }
     catch (InvalidOperationException ex)
     {
         logger.Error(ex.ToString());
         throw;
     }
     catch (ApplicationException ex)
     {
         logger.Error(ex.ToString());
         throw;
     }
     catch (Exception ex)
     {
         logger.Error(ex.ToString()); 
         throw;
     }
 }