Esempio n. 1
0
 public override bool Equals(object obj)
 {
     RadTypeResolver.LoadedAssembly loadedAssembly = (RadTypeResolver.LoadedAssembly)obj;
     if ((object)loadedAssembly.assembly == (object)this.assembly)
     {
         return(loadedAssembly.isTelerik == this.isTelerik);
     }
     return(false);
 }
Esempio n. 2
0
        private Type FindTypeByName(string className, bool onlyInTelerikAssemblies)
        {
            Type knownType = this.GetKnownType(className);

            if ((object)knownType != null)
            {
                RuntimeHelpers.RunClassConstructor(knownType.TypeHandle);
                return(knownType);
            }
            Type type;

            this.loadedTypes.TryGetValue(className.GetHashCode(), out type);
            if ((object)type != null)
            {
                return(type);
            }
            Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
            if (assemblies.Length != this.lastParsedAssemblyCount)
            {
                this.BuildLoadedAssemblies(assemblies);
            }
            for (int index = 0; index < this.loadedAssemblies.Count; ++index)
            {
                RadTypeResolver.LoadedAssembly loadedAssembly = this.loadedAssemblies[index];
                if (!onlyInTelerikAssemblies || loadedAssembly.isTelerik)
                {
                    type = loadedAssembly.assembly.GetType(className, false, false);
                    if ((object)type != null)
                    {
                        break;
                    }
                }
            }
            if ((object)type != null)
            {
                this.loadedTypes.Add(className.GetHashCode(), type);
                RuntimeHelpers.RunClassConstructor(type.TypeHandle);
            }
            return(type);
        }