Esempio n. 1
0
 public DatabaseUser RemoveWarning(bool allWarnings = false)
 {
     if (Warnings.IsEmpty())
     {
         throw new DivideByZeroException("User has no warnings");
     }
     if (!allWarnings)
     {
         Warnings.RemoveAt(Warnings.Count - 1);
     }
     else
     {
         Warnings.RemoveRange(0, Warnings.Count);
     }
     return(this);
 }
Esempio n. 2
0
 public bool HasWarnings() => !Warnings.IsEmpty();