Exemple #1
0
        private static async Task SetMaintenanceScheduleAsync(IRedisCache instance, DayOfWeek day, int startHourUtc, TimeSpan maintenanceWindow)
        {
            await instance.AsPremium()
            .Update()
            .WithoutPatchSchedule()
            .ApplyAsync();

            var scheduleEntry = new ScheduleEntry(new ScheduleEntryInner(
                                                      day,
                                                      startHourUtc,
                                                      maintenanceWindow));
            await instance.Update()
            .WithPatchSchedule(scheduleEntry)
            .ApplyAsync();
        }