Пример #1
0
        public override Type LoadClass(string className)
        {
            Type rt = null;

            if (!TryGetCachedType(className, out rt))
            {
                rt = Type.GetType(className);
                if (rt != null)
                {
                    return(rt);
                }
                if (BundleRuntime.Instance.EnableGlobalAssemblyFeature)
                {
                    rt = GetGlobalType(className);
                    if (rt != null)
                    {
                        CacheLoadedType(className, rt);
                        return(rt);
                    }
                }
                if ((!AssemblyPathLoaders.Exists(item => (rt = item.LoadClass(className)) != null) && !DependencyAssemblyLoaders.Exists(item => (rt = item.LoadClass(className)) != null)) && !DependencyBundleLoaders.Exists(item => (rt = item.LoadClass(className)) != null))
                {
                    return(rt);
                }
                CacheLoadedType(className, rt);
            }
            return(rt);
        }
Пример #2
0
        private object LoadFromLocalAssemblies(string resourceName)
        {
            object result = null;

            AssemblyPathLoaders.Exists(item => (result = item.LoadResource(resourceName, ResourceLoadMode.Local)) != null);
            return(result);
        }