KGy SOFT

HybridResourceManagerGetExpandoResourceSet Method

KGy SOFT Core Libraries Help
Retrieves the resource set for a particular culture, which can be dynamically modified.

Namespace:  KGySoft.Resources
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.4.0
Syntax

public virtual IExpandoResourceSet GetExpandoResourceSet(
	CultureInfo culture,
	ResourceSetRetrieval behavior = ResourceSetRetrieval.LoadIfExists,
	bool tryParents = false
)

Parameters

culture
Type: System.GlobalizationCultureInfo
The culture whose resources are to be retrieved.
behavior (Optional)
Type: KGySoft.ResourcesResourceSetRetrieval
Determines the retrieval behavior of the result IExpandoResourceSet. This parameter is optional.
Default value: LoadIfExists.
tryParents (Optional)
Type: SystemBoolean
 to use resource fallback to load an appropriate resource if the resource set cannot be found;  to bypass the resource fallback process. This parameter is optional.
Default value: .

Return Value

Type: IExpandoResourceSet
The resource set for the specified culture, or  if the specified culture cannot be retrieved by the defined behavior, or when Source is CompiledOnly so it cannot return an IExpandoResourceSet instance.

Implements

IExpandoResourceManagerGetExpandoResourceSet(CultureInfo, ResourceSetRetrieval, Boolean)
Exceptions

ExceptionCondition
ArgumentNullExceptionculture is .
ObjectDisposedExceptionThe HybridResourceManager is already disposed.
ArgumentOutOfRangeExceptionbehavior does not fall in the expected range.
MissingManifestResourceExceptionResource file of the neutral culture was not found, while tryParents is and behavior is not CreateIfNotExists.
See Also

Reference