Esempio n. 1
0
        /// <summary>
        /// Gets the modules.
        /// </summary>
        /// <param name="domain">The domain.</param>
        /// <param name="path">The path.</param>
        /// <returns>the modules..</returns>
        public static IEnumerable <ModuleInfo> GetModules(this AppDomain domain, string path)
        {
            var clone = domain.Clone();

            try
            {
                return(ModuleLoader(domain, clone).GetModuleInfos(path));
            }
            finally
            {
                AppDomain.Unload(clone);
            }
        }
Esempio n. 2
0
 public static AppDomain Clone(this AppDomain sourceAppDomain, string friendlyName)
 {
     return(sourceAppDomain.Clone(friendlyName, AppDomain.CurrentDomain.BaseDirectory));
 }