Example #1
0
        public static List <Type> GetInferredTypes(Type type)
        {
            TypeCrawler typeCrawler = new TypeCrawler(type);

            typeCrawler.Crawl();
            return(typeCrawler.inferredTypes
                   .Where(IsValid)
                   .ToList());
        }
Example #2
0
        private IEnumerable <Type> GetInferredTypes()
        {
            if (!inferTypes)
            {
                return(new List <Type>());
            }

            List <Type> types = new List <Type>();

            foreach (Type selectedType in selectedTypes)
            {
                List <Type> inferredTypes = TypeCrawler.GetInferredTypes(selectedType);
                types.AddRange(inferredTypes);
            }

            return(types);
        }