示例#1
0
        public void Dispose()
        {
            if (m_oAssemblyExplorerDomain != null)
            {
                AppDomain.Unload(m_oAssemblyExplorerDomain);

                m_oAssemblyExplorerDomain = null;

                m_managedExplorer = null;
            }
        }
示例#2
0
        private IAssemblyExplorer CreateAssemblyExplorer(string customizationDir)
        {
            if (m_managedExplorer == null)
            {
                m_managedExplorer =
                    (IAssemblyExplorer)m_oAssemblyExplorerDomain.CreateInstanceAndUnwrap(
                        typeof(AssemblyExplorer).Assembly.FullName,
                        typeof(AssemblyExplorer).FullName);
            }

            m_managedExplorer.CustomizationDir = customizationDir;

            return(m_managedExplorer);
        }
示例#3
0
        public TypeExplorer(IAssemblyExplorer assemblyExplorer)
        {
            _types = assemblyExplorer.Assemblies
                     .SelectMany(a => a.GetExportedTypes())
                     .Where(type => type.IsPublic || type.IsNestedPublic)
                     .Where(e => e.GetCustomAttribute <SuppressAutoAttribute>() == null)
                     .ToArray();

            _classes = _types
                       .Where(type => !type.IsAbstract && type.IsClass)
                       .Where(e => e.GetCustomAttribute <SuppressAutoAttribute>() == null)
                       .ToArray();

            _interfaces = _types
                          .Where(type => type.IsInterface)
                          .Where(e => e.GetCustomAttribute <SuppressAutoAttribute>() == null)
                          .ToArray();
        }
示例#4
0
 public AssemblyLoader(IAssemblyExplorer assemblyExplorer, ISuiteControllerFactory suiteControllerFactory)
 {
     _assemblyExplorer = assemblyExplorer;
       _suiteControllerFactory = suiteControllerFactory;
 }
示例#5
0
 public AssemblyLoader(IAssemblyExplorer assemblyExplorer, ISuiteControllerFactory suiteControllerFactory)
 {
     _assemblyExplorer       = assemblyExplorer;
     _suiteControllerFactory = suiteControllerFactory;
 }
 public RegisterCoreElementsModule(IAssemblyExplorer assemblyExplorer, ITypeExplorer typeExplorer, IAppInfo appInfo)
 {
     _assemblyExplorer = assemblyExplorer;
     _typeExplorer     = typeExplorer;
     _appInfo          = appInfo;
 }