コード例 #1
0
        private Task AppGameRefreshRequiredAsync(object sender, RefreshRequiredEventArgs e)
        {
            // Disable the backup page tab when there are no games
            if (e.GameCollectionModified)
            {
                RefreshBackupPageEnabled();
            }

            return(Task.CompletedTask);
        }
コード例 #2
0
        /// <summary>
        /// Fires the <see cref="RefreshRequired"/> event
        /// </summary>
        /// <returns>The task</returns>
        public async Task OnRefreshRequiredAsync(RefreshRequiredEventArgs eventArgs)
        {
            // Lock the refresh
            using (await OnRefreshRequiredAsyncLock.LockAsync())
            {
                RL.Logger?.LogDebugSource("A refresh is being requested");

                // Await the refresh event
                await(RefreshRequired?.RaiseAsync(this, eventArgs) ?? Task.CompletedTask);
            }
        }