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);
 }
示例#2
0
 public bool HasWarnings() => !Warnings.IsEmpty();