static IList <GhostAssembly> findGhostAssembliesNeedingNewVersion(GhostAssemblyLoader ghostAssemblyLoader, System.Reflection.Assembly oldAssembly, System.Reflection.Assembly newAssembly) { var ghostAssemblyList = new List <GhostAssembly>(); foreach (var referencedAssembly in newAssembly.GetReferencedAssemblies()) { var ghostAssembly = ghostAssemblyLoader.findGhostAssembly(referencedAssembly.Name); if (ghostAssembly == null) { continue; } if (ghostAssembly.ReloadRequired()) { var oldAssemblyName = findReferencedAssembly(oldAssembly, referencedAssembly.Name); if (oldAssemblyName != null && oldAssemblyName.Version == referencedAssembly.Version) { ghostAssemblyList.Add(ghostAssembly); } } } return(ghostAssemblyList); }
IDictionary <string, GhostAssembly> createGhostAssemblies(GhostAssemblyLoader loader, string[] assemblyLocations) { var ghostAssemblies = new Dictionary <string, GhostAssembly>(); foreach (var assemblyLocation in assemblyLocations) { var assemblyName = Path.GetFileNameWithoutExtension(assemblyLocation); ghostAssemblies[assemblyName] = new GhostAssembly(loader, assemblyName, assemblyLocation); } return(ghostAssemblies); }
internal GhostAssembly(GhostAssemblyLoader ghostAssemblyLoader, string name, string location) { this.ghostAssemblyLoader = ghostAssemblyLoader; Name = name; Location = location; }