public static ActionInfoWithDynamicImageMapCollection GetImageMaps(IEnumerable <MapAreaInfo> mapAreaInfoList, ActionInfoWithDynamicImageMapCollection actions, ReportItem reportItem) { List <ActionInfoWithDynamicImageMap> list = new List <ActionInfoWithDynamicImageMap>(); bool[] array = new bool[actions.Count]; foreach (MapAreaInfo mapAreaInfo in mapAreaInfoList) { MapAreaInfo current = mapAreaInfo; int num = MappingHelper.AddMapArea(current, actions, reportItem); if (num > -1 && !array[num]) { list.Add(((ReportElementCollectionBase <ActionInfoWithDynamicImageMap>)actions)[num]); array[num] = true; } else if (!string.IsNullOrEmpty(current.ToolTip)) { string text = default(string); ActionInfoWithDynamicImageMap actionInfoWithDynamicImageMap = MappingHelper.CreateActionInfoDynamic(reportItem, (ActionInfo)null, current.ToolTip, out text); if (actionInfoWithDynamicImageMap != null) { actionInfoWithDynamicImageMap.CreateImageMapAreaInstance(current.MapAreaShape, current.Coordinates, current.ToolTip); list.Add(actionInfoWithDynamicImageMap); } } } actions.InternalList.Clear(); actions.InternalList.AddRange(list); if (actions.Count == 0) { return(null); } return(actions); }