Divooka.Framework.ResourceManager

Divooka.Framework.ResourceManager.KeyBasedResourceManager

A Zip backed resource manager.

Remarks

Notice for correct reading/writing, we must ensure string values for text store is UTF8.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.MemoryBackedZipStream

A stream encapsulation for a Zip file stream, with a MemoryStream as buffer.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.TextStoreFileName

Name of the string values or TextStore object for all string resources

Divooka.Framework.ResourceManager.KeyBasedResourceManager.IsPureText

The resource pack is purely text and doesn't support other types of resources.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.ResourceFilePath

The path to the Zip file where resources are stored. Resource keys are the filename within the zip archive.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.FallbackResourceFilePath

A fallback zip archive to look for potentially existing resources.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.StringStoreCache

This stores all the string resources.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.GetString()

Retrieve text resource.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.GetStream()

Reading resource.

Remarks

Caller is responsible for disposing

Divooka.Framework.ResourceManager.KeyBasedResourceManager.GetBytes()

Reading resource as bytes.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.SetString()

Set text resource.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.SetStream()

Start creating resource.

Remarks

Caller is responsible for disposing

Divooka.Framework.ResourceManager.KeyBasedResourceManager.SetBytes()

Set bytes as resource.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.TryGetEntry()

Remarks

Need explicit disposal of ZipArchive.

Divooka.Framework.ResourceManager.KeyBasedResourceManager.TryGetEntryInZip()

Remarks

Need explicit disposal of ZipArchive.

Divooka.Framework.ResourceManager.LocalizationDefinitions.AvailableSystemLanguages

Mapping from formal language name to localization file code

Divooka.Framework.ResourceManager.LocalizationDefinitions.SystemLanguageLocalizedNames

A localized version of name for display purpose

Divooka.Framework.ResourceManager.LocalizationHelper

At this moment, specifically helps with localized documentation.

Divooka.Framework.ResourceManager.LocalizationHelper.TryGetLocalizedEnumName()

Try getting localized name of enum or return as is.

Parameters

NameDescriptionDefault
enum Source enum value.
language Target language.

Returns

Divooka.Framework.ResourceManager.LocalizationHelper.TryGetDocumentation()

Try to retrieve (localized) documentation for arbitrary type from default assembly localization XML files.

Remarks

Notice this static helper method is not cached.

Parameters

NameDescriptionDefault
typeMember The entity to retrieve, can be either a sub Type, or a MethodBase

Returns

Retrieved documentation.

Divooka.Framework.ResourceManager.ResourceHelper.GetDefaultResourceManager()

Remarks

Notice we must ensure the localized file is directly available next to the assembly. In the future we may adopt a convention to put things in some sub folder.