bool IsWarningEnabled(int code, int level, Location loc) { if (WarningLevel < level) { return(false); } if (warning_ignore_table != null) { if (warning_ignore_table.Contains(code)) { return(false); } } if (warning_regions_table == null || loc.IsNull) { return(true); } WarningRegions regions = (WarningRegions)warning_regions_table [loc.Name]; if (regions == null) { return(true); } return(regions.IsWarningEnabled(code, loc.Row)); }
public WarningRegions RegisterWarningRegion(Location location) { if (warning_regions_table == null) { warning_regions_table = new Hashtable(); } WarningRegions regions = (WarningRegions)warning_regions_table [location.Name]; if (regions == null) { regions = new WarningRegions(); warning_regions_table.Add(location.Name, regions); } return(regions); }
public WarningRegions RegisterWarningRegion (Location location) { WarningRegions regions; if (warning_regions_table == null) { regions = null; warning_regions_table = new Dictionary<int, WarningRegions> (); } else { warning_regions_table.TryGetValue (location.File, out regions); } if (regions == null) { regions = new WarningRegions (); warning_regions_table.Add (location.File, regions); } return regions; }
public WarningRegions RegisterWarningRegion (Location location) { if (warning_regions_table == null) warning_regions_table = new Hashtable (); WarningRegions regions = (WarningRegions)warning_regions_table [location.Name]; if (regions == null) { regions = new WarningRegions (); warning_regions_table.Add (location.Name, regions); } return regions; }