コード例 #1
0
            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);
            }
コード例 #2
0
        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);
        }
コード例 #3
0
 internal GhostAssembly(GhostAssemblyLoader ghostAssemblyLoader, string name, string location)
 {
     this.ghostAssemblyLoader = ghostAssemblyLoader;
     Name     = name;
     Location = location;
 }