Ejemplo n.º 1
0
 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");
 }
Ejemplo n.º 2
0
 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");
 }
Ejemplo n.º 3
0
 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");
 }
Ejemplo n.º 4
0
        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());
        }
Ejemplo n.º 5
0
 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");
 }
Ejemplo n.º 6
0
        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());
        }
Ejemplo n.º 7
0
 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");
 }