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 void ConfigureResolver() { UniqueStringCollection strings = new UniqueStringCollection(this._query.AllFileReferences.Concat <string>(PluginAssembly.GetCompatibleAssemblies(this._query.IsMyExtensions)), new FileNameComparer()); if (this._query.Repository != null) { strings.AddRange(this._query.Repository.GetDriverAssemblies()); } UniqueStringCollection strings2 = new UniqueStringCollection(this._query.AdditionalGACReferences); if (!(this._query.IsMyExtensions || (MyExtensions.Query == null))) { strings.AddRange(MyExtensions.Query.AllFileReferences); strings2.AddRange(MyExtensions.Query.AdditionalGACReferences); } bool flag = ((this._query.Repository != null) && this._query.Repository.DriverLoader.IsValid) && (this._query.Repository.DriverLoader.Driver is LinqToSqlDynamicDriver); string fileOrPath = this._typeResolver.Configure(strings, strings2, (this._query.Repository != null) && !this._query.Repository.DynamicSchema, flag); if (((fileOrPath != null) && (this._query.Repository != null)) && this._query.Repository.DynamicSchema) { this._typeResolver.set_DataContextBuilding(false); if ((this._query.Repository.IntellicachePath == null) || (this._query.Repository.IntellicachePath.FullPath != fileOrPath)) { this._query.Repository.IntellicachePath = new TempFileRef(fileOrPath); } } }