예제 #1
0
            public void UpdateSameFolderAssemblyReferenceChain(AssemblyProber.AssemblyReferenceCache cache, string assemblyFilePath, HashSet <string> visitedPaths)
            {
                FileInfo info;

                try
                {
                    info = new FileInfo(assemblyFilePath);
                    if (!info.Exists)
                    {
                        return;
                    }
                }
                catch
                {
                    return;
                }
                string[] sameFolderReferences = this.GetSameFolderReferences(assemblyFilePath, true);
                cache.Update(assemblyFilePath, info.LastWriteTimeUtc, info.Length, sameFolderReferences);
                visitedPaths.Add(assemblyFilePath);
                foreach (string str in sameFolderReferences)
                {
                    if (!(visitedPaths.Contains(str) || !cache.NeedsUpdate(str)))
                    {
                        this.UpdateSameFolderAssemblyReferenceChain(cache, str, visitedPaths);
                    }
                }
            }
예제 #2
0
            public void UpdateSameFolderAssemblyReferenceChain(AssemblyProber.AssemblyReferenceCache cache, string[] assemblyFilePaths)
            {
                HashSet <string> visitedPaths = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase);

                foreach (string str in assemblyFilePaths)
                {
                    this.UpdateSameFolderAssemblyReferenceChain(cache, str, visitedPaths);
                }
            }