Exemple #1
0
        /// <summary>
        /// Scans a directory for assemblies and populate the results in the typal library.
        /// </summary>
        /// <param name="library"></param>
        /// <param name="directory"></param>
        public void ScanDirectoryForAssemblies(SemanticModel library, DirectoryPath directory)
        {
            var assemblyFiles = XAssemblies.GetAssemblyFiles(directory);

            foreach (var assemblyFile in assemblyFiles)
            {
                System.Reflection.Assembly assembly;



                try
                {
                    assembly = System.Reflection.Assembly.LoadFile(assemblyFile.Value);
                }
                catch (Exception e)
                {
                    assembly = null;

                    XLog.LogException(e);
                }

                if (assembly != null)
                {
                    XAssemblyScanning.Api.ScanAssembly(library, assembly);
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Scans the directory containing the entry assembly for assemblies and populate the results in the typal library.
        /// </summary>
        public void ScanEntryAssemblyDirectoryForAssemblies(SemanticModel library)
        {
            var directory = XAssemblies.GetEntryAssemblyLocalPath();

            ScanDirectoryForAssemblies(library, directory);
        }