LocalizationHelperReleaseAllScopedResources Method
Releases the loaded resource sets of all scoped resources. Resource sets will be reloaded on the next request.
Can be useful after calling
GetResourceSet if the result was edited and the changes should be discarded.
Namespace: KGySoft.WinFormsAssembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
public static void ReleaseAllScopedResources()
Public Shared Sub ReleaseAllScopedResources
public:
static void ReleaseAllScopedResources()
static member ReleaseAllScopedResources : unit -> unit
This method may have no effect, if an auto save operation occurred since the last GetResourceSet call.
Auto save occurs when LanguageSettings.DisplayLanguage changes or when
localization is requested for many different LocalizationContexts in a row, and the resources of some contexts are dropped from the internal cache.
This method affects resources managed by the
LocalizationHelper class.
This includes resources of
BaseForm and
BaseUserControl instances when their
DynamicStringLocalization
property is
LocalScope or
AssemblyScope.
If you use
DynamicResourceManager managers directly whose
UseLanguageSettings
property is
, use the
LanguageSettings.ReleaseAllResources method instead.