private static void Update() { List <PluginAssembly> source = new List <PluginAssembly>(); foreach (FileInfo info in new DirectoryInfo(_folder).GetFiles()) { if (((info.Name.ToLowerInvariant() != "linqpad.exe") && ((info.Extension.ToLowerInvariant() == ".exe") || (info.Extension.ToLowerInvariant() == ".dll"))) && !Path.GetFileNameWithoutExtension(info.Name).ToLowerInvariant().EndsWith(".fw35")) { PluginAssembly assembly; if (!(_assemblies.TryGetValue(info.FullName, out assembly) && !(assembly._lastWriteTime != info.LastWriteTimeUtc))) { assembly = new PluginAssembly { _path = info.FullName, _architecture = GetProcessorArchitecture(info.FullName), _lastWriteTime = info.LastWriteTimeUtc }; } source.Add(assembly); } } _assemblies = source.ToDictionary <PluginAssembly, string>(a => a._path); }
private static void Update() { List<PluginAssembly> source = new List<PluginAssembly>(); foreach (FileInfo info in new DirectoryInfo(_folder).GetFiles()) { if (((info.Name.ToLowerInvariant() != "linqpad.exe") && ((info.Extension.ToLowerInvariant() == ".exe") || (info.Extension.ToLowerInvariant() == ".dll"))) && !Path.GetFileNameWithoutExtension(info.Name).ToLowerInvariant().EndsWith(".fw35")) { PluginAssembly assembly; if (!(_assemblies.TryGetValue(info.FullName, out assembly) && !(assembly._lastWriteTime != info.LastWriteTimeUtc))) { assembly = new PluginAssembly { _path = info.FullName, _architecture = GetProcessorArchitecture(info.FullName), _lastWriteTime = info.LastWriteTimeUtc }; } source.Add(assembly); } } _assemblies = source.ToDictionary<PluginAssembly, string>(a => a._path); }
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); } } }