/// <summary> /// Loads the specified resource string, either from the assembly's primary resources, or its shared resources. /// </summary> /// <remarks>This method is thread-safe.</remarks> /// <param name="name"></param> /// <returns>The resource string, or null if not found.</returns> internal static string GetString(string name) { string resource = PrimaryResources.GetString(name, CultureInfo.CurrentUICulture) ?? SharedResources.GetString(name, CultureInfo.CurrentUICulture); ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name); return(resource); }
internal static string GetString(string name) { // NOTE: the ResourceManager.GetString() method is thread-safe string resource = PrimaryResources.GetString(name, CultureInfo.CurrentUICulture) ?? SharedResources.GetString(name, CultureInfo.CurrentUICulture); ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name); return(resource); }