public async Task DeleteReservationAsync(string reservationId, ReservationToken token)
 {
     await ContextActionAsync(async context =>
     {
         await context.Live.DeleteReservationAsync(reservationId, token);
     });
 }
 public async Task UseReservationAsync(string liveId, ReservationToken token)
 {
     await ContextActionAsync(async context =>
     {
         await context.Live.UseReservationAsync(liveId, token);
     });
 }
示例#3
0
        private async Task <ReservationToken> GetReservationTokenAsync(bool forceRefresh = false)
        {
            if (_token is null)
            {
                _token = await _niconicoSession.ToolkitContext.Timeshift.GetReservationTokenAsync();
            }

            if (_token == null)
            {
                throw new HohoemaExpception("Failed refresh ReservationToken.");
            }

            return(_token);
        }