示例#1
0
        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);
        }
示例#2
0
		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;
		}