示例#1
0
        /// <summary>
        /// Checks to see if dataset2 is compatible with dataset1.
        /// </summary>
        /// <param name="dataset1"></param>
        /// <param name="dataset2"></param>
        /// <returns></returns>
        private static bool IsValidDatasetCombo(SupportedDatasetTypes dataset1, SupportedDatasetTypes dataset2)
        {
            List <SupportedDatasetTypes> datasets;

            if (supportedDatasetCombinations.TryGetValue(dataset1, out datasets))
            {
                return(datasets.Contains(dataset2));
            }

            return(false);
        }
示例#2
0
 /// <summary>
 /// Checks to see if the types are compatible with the dataset.
 /// </summary>
 /// <param name="dataset"></param>
 /// <param name="types"></param>
 /// <returns></returns>
 public static bool IsValidDatasetCombo(SupportedDatasetTypes dataset, IEnumerable <SupportedDatasetTypes> types)
 {
     return(types.Aggregate(true, (current, type) => current & IsValidDatasetCombo(dataset, type)));
 }