public string Resolve(string assemblyName) { string path; GlobalAssemblyCache.ResolvePartialName(assemblyName, out path, Architectures, this.PreferredCulture); return(File.Exists(path) ? path : null); }
public string ResolveAssemblyName(string displayName) { Contract.ThrowIfNull(displayName); AssemblyIdentity identity = GlobalAssemblyCache.ResolvePartialName(displayName, architectureFilter, preferredCulture); return((identity != null) ? identity.Location : null); }
public bool TryResolvePartialName(string name, out string assemblyLocation) { #if DESKTOP return(GlobalAssemblyCache.ResolvePartialName(name, out assemblyLocation) != null); #else assemblyLocation = null; return(false); #endif }
public static string GetGACAssemblyLocation(string assemblyDisplayName) { return(_assemblyLocations.GetOrAdd( assemblyDisplayName, (name) => { string path; GlobalAssemblyCache.ResolvePartialName(assemblyDisplayName, out path); return path; })); }
public string ResolveReference(string reference) { if (PathUtilities.IsFilePath(reference)) { return(null); } string path; GlobalAssemblyCache.ResolvePartialName(reference, out path, _architectures, this.PreferredCulture); return((path != null && PortableShim.File.Exists(path)) ? path : null); }
public override string ResolveReference(string reference, string baseFilePath) { if (PathUtilities.IsFilePath(reference)) { return(base.ResolveReference(reference, baseFilePath)); } string path; GlobalAssemblyCache.ResolvePartialName(reference, out path, _architectures, this.PreferredCulture); return(FileExists(path) ? path : null); }
private IEnumerable <CompletionItem> GetCompletionsWorker(string pathSoFar) { var comma = pathSoFar.IndexOf(','); if (comma >= 0) { var path = pathSoFar.Substring(0, comma); return(from identity in GetAssemblyIdentities(path) let text = identity.GetDisplayName() select new CompletionItem(_completionProvider, text, _textChangeSpan, glyph: Glyph.Assembly)); } else { return(from displayName in s_lazyAssemblySimpleNames.Value select new CompletionItem( _completionProvider, displayName, _textChangeSpan, descriptionFactory: c => Task.FromResult(GlobalAssemblyCache.ResolvePartialName(displayName).GetDisplayName().ToSymbolDisplayParts()), glyph: Glyph.Assembly)); } }