Exemplo n.º 1
0
        public static TypeCe For(Type type)
        {
            Throw.IfArgumentNull(type, "type");

            var references = ReferencesInspector.For(type)
                             .Where(type.NestedTypes().Not());

            return(new TypeCe(references, type));
        }
Exemplo n.º 2
0
        private static IEnumerable <Type> GetTypesThatReferences(Type target)
        {
            //TODO: Need to inspect more assemblies
            var allTypes = target.Assembly.GetTypes();

            foreach (Type type in allTypes)
            {
                if (ReferencesInspector.For(type).Contains(target))
                {
                    yield return(type);
                }
            }
        }