protected void CheckBlacklisted(Ommel.FileType type, string why) { //if (IsBlacklisted(type)) throw new BlacklistedFileTypeException(Key, type, why); }
protected bool IsBlacklisted(Ommel.FileType type) { return((WhitelistedFileTypes.Count > 0 && !WhitelistedFileTypes.Contains(type)) || BlacklistedFileTypes.Contains(type)); }
public BlacklistedFileTypeException(string name, Ommel.FileType ftype, string why) : base($"You are not allowed to use operation '{name}' on files of type '{ftype}' - {why}") { }