internal static Pair <Type, T> ResolveFromLocalAndPath <T>( string soughtName, ClassProvidedCompileTimeRegistry locals, PathRegistry <string, ClassProvided> path, string objectName, ICollection <string> moduleUses, ModuleDependenciesCompileTime moduleDependencies, Func <T, ISet <string> > namesProvider) where T : Attribute { if (locals.Classes.IsEmpty() && path.IsEmpty()) { return(null); } var annotationType = typeof(T); try { // try resolve from local var localPair = ResolveFromLocal(soughtName, locals, annotationType, objectName, namesProvider); if (localPair != null) { return(localPair); } // try resolve from path, using module-uses when necessary return(ResolveFromPath(soughtName, path, annotationType, objectName, moduleUses, moduleDependencies, namesProvider)); } catch (ExprValidationException ex) { throw new EPException(ex.Message, ex); } }
public static ClassLoader GetClassLoader( ICollection<Assembly> assemblies, ClassLoader parentClassLoader, PathRegistry<string, ClassProvided> classProvidedPathRegistry) { if (classProvidedPathRegistry.IsEmpty()) { return new PriorityClassLoader(parentClassLoader, assemblies); } return new ClassProvidedImportClassLoader(parentClassLoader, classProvidedPathRegistry); }