Example #1
0
 public async Task Refresh([ActivityTrigger] string username, ILogger log)
 {
     await RefreshService.HandleRequestAsync(
         username,
         dataService => dataService.GetStudentInfoAsync(username),
         (client, context) => client.GetStudentInfoAsync(context),
         (dataService, resource) => dataService.SetStudentInfoAsync(resource),
         (oldRes, newRes) =>
     {
         newRes.CalendarSubscriptionId = oldRes?.CalendarSubscriptionId;
         return(newRes.Name != null);
     },
         null,
         log
         );
 }