public IEnumerable <IPackageInfo> Load(IPackageLog log) { var list = new List <string> { AppDomain.CurrentDomain.SetupInformation.ApplicationBase }; var binPath = FubuMvcPackageFacility.FindBinPath(); if (binPath.IsNotEmpty()) { list.Add(binPath); } // This is a workaround for Self Hosted apps where the physical path is different than the AppDomain's original // path if (FubuMvcPackageFacility.PhysicalRootPath.IsNotEmpty()) { var path = FubuMvcPackageFacility.PhysicalRootPath.ToFullPath().AppendPath("bin"); if (Directory.Exists(path) && !list.Select(x => x.ToLower()).Contains(path.ToLower())) { list.Add(path); } } list.Each(x => { log.Trace("Looking for assemblies marked with the [FubuModule] attribute in " + x); }); return(LoadPackages(list)); }
public Dictionary <string, object> get_appdomain() { var dict = new Dictionary <string, object> { { "reloaded", _reloaded.Timestamp.ToLocalTime().ToString() }, { "fubuPath", FubuMvcPackageFacility.GetApplicationPath() }, { "baseDirectory", AppDomain.CurrentDomain.BaseDirectory }, { "binPath", FubuMvcPackageFacility.FindBinPath() }, { "config", AppDomain.CurrentDomain.SetupInformation.ConfigurationFile } }; var assemblyLocations = AppDomain.CurrentDomain.GetAssemblies() .Select(x => new AssemblyLocation(x)) .OrderBy(x => x.name) .ToArray(); dict.Add("assemblies", assemblyLocations); return(dict); }