/// <summary> /// Attempt to query the HostDll pointed by the Apiset contract. /// </summary> /// <param name="ImportDllName"> DLL name as in the parent import entry. May or may not be an apiset contract </param> /// <returns> Return the first host dll pointed by the apiset contract if found, otherwise it return an empty string.</returns> public static string LookupApiSetLibrary(string ImportDllName) { // Look for api set target if (!ImportDllName.StartsWith("api-") && !ImportDllName.StartsWith("ext-")) { return(""); } // Strip the .dll extension var ImportDllWIthoutExtension = Path.GetFileNameWithoutExtension(ImportDllName); var Targets = ApiSetmapCache.Lookup(ImportDllWIthoutExtension); return(Targets != null && Targets.Count > 0 ? Targets[0] : ""); }
/// <summary> /// Attempt to query the HostDll pointed by the Apiset contract. /// </summary> /// <param name="ImportDllName"> DLL name as in the parent import entry. May or may not be an apiset contract </param> /// <returns> Return the first host dll pointed by the apiset contract if found, otherwise it return an empty string.</returns> public static string LookupApiSetLibrary(string ImportDllName) { // Look for api set target if (!ImportDllName.StartsWith("api-", StringComparison.CurrentCultureIgnoreCase) && !ImportDllName.StartsWith("ext-", StringComparison.CurrentCultureIgnoreCase)) { return(""); } // Strip the .dll extension and search for matching targets var ImportDllWIthoutExtension = Path.GetFileNameWithoutExtension(ImportDllName); var Targets = ApiSetmapCache.Lookup(ImportDllWIthoutExtension); if ((Targets != null) && (Targets.Count > 0)) { return(Targets[0]); } return(""); }