예제 #1
0
        public ReflectionType GetTypeObject(System.Type t)
        {
            ReflectionType type = null;

            if (typeCache.TryGetValue(t.FullName, out type))
            {
                return(type);
            }
            type = new ReflectionType(t);
            typeCache.Add(t.FullName, type);
            return(type);
        }
예제 #2
0
        public ReflectionType GetTypeObject(string fullname)
        {
            ReflectionType type = null;

            if (typeCache.TryGetValue(fullname, out type))
            {
                return(type);
            }
            var asms = System.AppDomain.CurrentDomain.GetAssemblies();

            foreach (var asm in asms)
            {
                var t = asm.GetType(fullname);
                if (t != null)
                {
                    type = new ReflectionType(t);
                    typeCache.Add(fullname, type);
                    return(type);
                }
            }
            return(null);
        }
예제 #3
0
 public ReflectionClassWithObject(ReflectionType t, object obj)
 {
     this.type   = t;
     this.target = obj;
 }