Exemplo n.º 1
0
 public static void ShowToaster(this Response @this, Form form)
 {
     if (@this.AccessErrors?.Length > 0)
     {
         form.Invoke(new MethodInvoker(() => Toaster.NotAuthorizedToast()));
     }
     else if (@this.DerivationErrors?.Length > 0)
     {
         form.Invoke(new MethodInvoker(() => Toaster.DerivationErrors(@this.DerivationErrors)));
     }
     else if (@this.VersionErrors?.Length > 0 || @this.MissingErrors?.Length > 0)
     {
         form.Invoke(new MethodInvoker(() => Toaster.ConcurrencyDetectedToast()));
     }
     else
     {
         form.Invoke(new MethodInvoker(() => Toaster.GeneralError(@this)));
     }
 }