DynamicResourceManagerGetResourceSet Method

Retrieves the resource set for a particular culture.

Definition

Namespace: KGySoft.Resources
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public override ResourceSet? GetResourceSet(
	CultureInfo culture,
	bool loadIfExists,
	bool tryParents
)

Parameters

culture  CultureInfo
The culture whose resources are to be retrieved.
loadIfExists  Boolean
to load the resource set, if it has not been loaded yet and the corresponding resource file exists; otherwise, .
tryParents  Boolean
to use resource fallback to load an appropriate resource if the resource set cannot be found; to bypass the resource fallback process.

Return Value

ResourceSet
The resource set for the specified culture.

Remarks

If AppendOnLoad option is enabled in AutoAppend property, then dynamic expansion of the resource sets may occur when calling this method.

  Note

For more details see the Auto Appending section at the description of the DynamicResourceManager class.

Appending is applied only if both loadIfExists and tryParents are , though no new resource set will be created. To make possible to create a completely new resource set call the GetExpandoResourceSet method with CreateIfNotExists behavior instead.

If due to the current parameters no auto appending is performed during the call, then it will not happen also for successive calls for the same resource set until the ReleaseAllResources method is called.

Exceptions

ArgumentNullExceptionculture is .
ObjectDisposedExceptionThe HybridResourceManager is already disposed.
MissingManifestResourceExceptiontryParents and ThrowException are and the resource of the neutral culture was not found.

See Also