private Compile ( bool throwOnFileNotFound ) : bool | ||
throwOnFileNotFound | bool | |
return | bool |
internal void TryToAddImplicitAssemblyReference(String name){ if (!this.autoRef) return; String key; SimpleHashtable implictAssemblyCache = this.implicitAssemblyCache; if (implicitAssemblyCache == null) { //Populate cache with things that should not be autoref'd. Canonical form is lower case without extension. implicitAssemblyCache = new SimpleHashtable(50); //PEFileName always includes an extension and is never NULL. implicitAssemblyCache[Path.GetFileNameWithoutExtension(this.PEFileName).ToLower(CultureInfo.InvariantCulture)] = true; foreach (Object item in this.vsaItems){ VsaReference assemblyReference = item as VsaReference; if (assemblyReference == null || assemblyReference.AssemblyName == null) continue; key = Path.GetFileName(assemblyReference.AssemblyName).ToLower(CultureInfo.InvariantCulture); if (key.EndsWith(".dll")) key = key.Substring(0, key.Length-4); implicitAssemblyCache[key] = true; } this.implicitAssemblyCache = implicitAssemblyCache; } key = name.ToLower(CultureInfo.InvariantCulture); if (implicitAssemblyCache[key] != null) return; implicitAssemblyCache[key] = true; try{ VsaReference assemblyReference = new VsaReference(this, name + ".dll"); if (assemblyReference.Compile(false)){ ArrayList implicitAssemblies = this.implicitAssemblies; if (implicitAssemblies == null) { implicitAssemblies = new ArrayList(); this.implicitAssemblies = implicitAssemblies; } implicitAssemblies.Add(assemblyReference.Assembly); } }catch(VsaException){ } }
internal void TryToAddImplicitAssemblyReference(string name) { if (this.autoRef) { string str; if (this.implicitAssemblyCache == null) { this.implicitAssemblyCache = new SimpleHashtable(50); this.implicitAssemblyCache[Path.GetFileNameWithoutExtension(this.PEFileName).ToLowerInvariant()] = true; foreach (object obj2 in base.vsaItems) { VsaReference reference = obj2 as VsaReference; if ((reference != null) && (reference.AssemblyName != null)) { str = Path.GetFileName(reference.AssemblyName).ToLowerInvariant(); if (str.EndsWith(".dll", StringComparison.Ordinal)) { str = str.Substring(0, str.Length - 4); } this.implicitAssemblyCache[str] = true; } } this.implicitAssemblyCache = this.implicitAssemblyCache; } str = name.ToLowerInvariant(); if (this.implicitAssemblyCache[str] == null) { this.implicitAssemblyCache[str] = true; try { VsaReference reference2 = new VsaReference(this, name + ".dll"); if (reference2.Compile(false)) { ArrayList implicitAssemblies = this.implicitAssemblies; if (implicitAssemblies == null) { implicitAssemblies = new ArrayList(); this.implicitAssemblies = implicitAssemblies; } implicitAssemblies.Add(reference2.Assembly); } } catch (JSVsaException) { } } } }