Class ChainedResourceManager
Resolves strings from a prioritized sequence of resource managers.
public sealed class ChainedResourceManager : ResourceManager
- Inheritance
-
ChainedResourceManager
- Inherited Members
Remarks
Use this resource manager to compose application resources with reusable-library resources.
Place application resources first so that they can override library defaults.
A missing or empty value continues lookup with the next manager. A manager that throws
System.Resources.MissingManifestResourceException is skipped.
Constructors
ChainedResourceManager(params ResourceManager[])
Initializes a new instance of the ChainedResourceManager class.
public ChainedResourceManager(params ResourceManager[] managers)
Parameters
managersResourceManager[]- The resource managers to query in priority order. Null entries are ignored.
Exceptions
- ArgumentNullException
managersis null.
Methods
GetString(string)
Gets the first non-empty string found for the specified resource name, using the current
UI culture and its fallback chain.
public override string? GetString(string name)
Parameters
namestring- The name of the resource to retrieve.
Returns
GetString(string, CultureInfo?)
Gets the first non-empty string found for the specified resource name and culture.
public override string? GetString(string name, CultureInfo? culture)
Parameters
namestring- The name of the resource to retrieve.
cultureCultureInfo- The culture to use for lookup, or null to use the current UI culture. The value is passed unchanged to each resource manager.