private void GetAssemblyReferenceMap(out FileWithVersionInfo[] volatileRefs, out FileWithVersionInfo[] nonvolatileRefs) { string fileName = null; UniqueStringCollection strings = new UniqueStringCollection(base.AllFileReferences, new FileNameComparer()); strings.AddRange(PluginAssembly.GetCompatibleAssemblies(base.IsMyExtensions)); if ((base.Repository != null) && !base.Repository.DynamicSchema) { strings.Add(base.Repository.CustomAssemblyPath); strings.AddRange(base.Repository.GetDriverAssemblies()); if (base.Repository.DriverLoader.IsValid && (base.Repository.DriverLoader.InternalID == null)) { try { fileName = Path.GetFileName(base.Repository.DriverLoader.GetAssemblyPath()); } catch { } } } List <FileWithVersionInfo> list = new List <FileWithVersionInfo>(); List <string> assemblyFilePaths = new List <string>(); foreach (string str2 in strings) { try { if (Path.IsPathRooted(str2) && File.Exists(str2)) { if (!(ShadowAssemblyManager.IsShadowable(str2) && !Path.GetFileName(str2).Equals(fileName, StringComparison.OrdinalIgnoreCase))) { list.Add(new FileWithVersionInfo(str2)); } else { assemblyFilePaths.Add(str2); } } } catch { } } nonvolatileRefs = (from r in list orderby r.FilePath select r).ToArray <FileWithVersionInfo>(); volatileRefs = AssemblyProber.GetSameFolderAssemblyReferenceChain(assemblyFilePaths); }
public string[] GetStaticSchemaSameFolderReferences() { if (!(((this.Repository != null) && !this.Repository.DynamicSchema) && File.Exists(this.Repository.CustomAssemblyPath))) { return(new string[0]); } DateTime lastAccessTimeUtc = new FileInfo(this.Repository.CustomAssemblyPath).LastAccessTimeUtc; if ((this._lastCustomDataContextAssembly != this.Repository.CustomAssemblyPath) || (this._lastCustomDataContextWrite != lastAccessTimeUtc)) { this._lastCustomDataContextAssembly = this.Repository.CustomAssemblyPath; this._lastCustomDataContextWrite = lastAccessTimeUtc; try { this._lastIndirectRefs = new string[] { this.Repository.CustomAssemblyPath }.Concat <string>(AssemblyProber.GetSameFolderReferences(this.Repository.CustomAssemblyPath)).ToArray <string>(); } catch (Exception exception) { Log.Write(exception); this._lastIndirectRefs = new string[] { this.Repository.CustomAssemblyPath }; } } return(this._lastIndirectRefs); }