protected virtual async Task OnIsIndeterminateChanged() { if (this.IsIndeterminateChanged != null) { var e = new AsyncEventArgs(); this.IsIndeterminateChanged(this, e); await e.Complete().ConfigureAwait(false); } this.OnPropertyChanged("IsIndeterminate"); }
protected virtual async Task OnDescriptionChanged() { if (this.DescriptionChanged != null) { var e = new AsyncEventArgs(); this.DescriptionChanged(this, e); await e.Complete().ConfigureAwait(false); } this.OnPropertyChanged("Description"); }
protected virtual async Task OnCurrentItemChanged() { if (this.CurrentItemChanged != null) { var e = new AsyncEventArgs(); this.CurrentItemChanged(this, e); await e.Complete().ConfigureAwait(false); } this.OnPropertyChanged("CurrentItem"); }
public virtual Task OnEnded() { if (this.Ended == null) { #if NET40 return(TaskEx.FromResult(false)); #else return(Task.CompletedTask); #endif } var e = new AsyncEventArgs(); this.Ended(this, e); return(e.Complete()); }
protected virtual async Task OnThemeChanged() { if (this.Theme != null) { this.Theme.Enable(); } if (this.ThemeChanged != null) { var e = new AsyncEventArgs(); this.ThemeChanged(this, e); await e.Complete().ConfigureAwait(false); } this.OnPropertyChanged("Theme"); }
protected virtual Task OnFaulted() { this.IsFaulted = true; if (this.Faulted == null) { #if NET40 return(TaskEx.FromResult(false)); #else return(Task.CompletedTask); #endif } var e = new AsyncEventArgs(); this.Faulted(this, e); return(e.Complete()); }
protected virtual async Task OnCurrentStreamChanged() { if (this.CurrentStream != null) { this.CurrentStream.Ending += this.Ending; this.CurrentStream.Ended += this.Ended; } if (this.CurrentStreamChanged != null) { var e = new AsyncEventArgs(); this.CurrentStreamChanged(this, e); await e.Complete().ConfigureAwait(false); } this.OnPropertyChanged("CurrentStream"); }