Beispiel #1
0
 public Handler(ICalendarApi calendarApi, ApplicationDbContext context)
 {
     _calendarApi = calendarApi;
     _context     = context;
 }
Beispiel #2
0
 public Handler(ApplicationDbContext context, ICalendarApi calendarApi)
 {
     _context     = context;
     _calendarApi = calendarApi;
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='lang'>
 /// </param>
 public static IList <LMSApplicationCoreViewModelContextViewModel> GetCalendarContexts(this ICalendarApi operations, string lang)
 {
     return(operations.GetCalendarContextsAsync(lang).GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='lang'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <LMSApplicationCoreViewModelContextViewModel> > GetCalendarContextsAsync(this ICalendarApi operations, string lang, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetCalendarContextsWithHttpMessagesAsync(lang, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='calendarGetEventsCommand'>
 /// </param>
 /// <param name='lang'>
 /// </param>
 public static IList <LMSApplicationCoreViewModelCalendarEventViewModel> GetCalendarEvents(this ICalendarApi operations, LMSApplicationCoreCommandsCalendarGetEventsCommand calendarGetEventsCommand, string lang)
 {
     return(operations.GetCalendarEventsAsync(calendarGetEventsCommand, lang).GetAwaiter().GetResult());
 }