Exemple #1
0
        private static IEnumerable<string> GetModuleNames()
        {
            var types = new List<Type> ();

            AssemblyLocator assemblyLocator = new AssemblyLocator();

            var domainAssemblies = assemblyLocator.LocateDomainAssemblies ();

            foreach (var assembly in domainAssemblies)
            {
                types.AddRange ( assembly.GetTypes () );
            }

            IList<string> nameList = new List<string> ();
            foreach ( var type in types )
            {
                var namespaces = type.Namespace.Split ( '.' );
                var nspace = namespaces[namespaces.Length - 1];
                if ( nspace.EndsWith ( "Module" ) && !nameList.Contains ( nspace ) )
                {
                    nameList.Add ( nspace );
                }
            }

            return nameList.ToArray ();
        }
Exemple #2
0
 private IEnumerable<Assembly> GetRemDomainAssemblyList()
 {
     AssemblyLocator assemblyLocator = new AssemblyLocator();
     return assemblyLocator.LocateDomainAssemblies ();
 }