コード例 #1
0
		/// <summary>
		///  Supports threads
		/// </summary>
		/// <param name="points"></param>
		/// <param name="filterData"></param>
		/// <returns></returns>
		public static IList<P> FilterByType(IList<P> points, FilterData filterData)
		{
			if (filterData.TypeFilterExclude.Count == GmcSettings.Get.MarkerTypes.Count)
			{
				// Filter all 
				return new List<P>(); // empty				
			}
			if (filterData.TypeFilterExclude.None())
			{
				// Filter none
				return points;
			}

			// Filter data by typeFilter value			
		    return FilterByTypeHelper(points, filterData);
		}
コード例 #2
0
		// O(n)
		private static IList<P> FilterByTypeHelper(IList<P> points, FilterData filterData)
		{
			return points
				.Where(p => filterData.TypeFilterExclude.Contains(p.T) == false)
				.ToList();
		}