StringResources Type

String resource manager for the AltaxoCore DLL and other DLLs that reference AltaxoCore.

Constructors

Constructor Description

StringResources(path, resourceName, assemblyContainingTheResources)

Full Usage: StringResources(path, resourceName, assemblyContainingTheResources)

Parameters:
    path : string - The path to the resource. This is usually the default namespace, a dot, and the folders (separated by dots) where the resource file(s) reside. See remarks for how to name the neutral resource files and the resource files for other cultures.
    resourceName : string - Name of the neutral (english) resource file (without the '.resource' extension.
    assemblyContainingTheResources : Assembly - The assembly containing the resources.

Initializes a new instance of the StringResources class.

The naming conventions will be explained using AltaxoCore as example.

The default namespace of the AltaxoCore DLL is 'Altaxo'.

The resource files reside in the source folder 'Resources'.

The neutral resource file is named 'StringResources.resources'.

The resource file for the german culture must be named 'de.StringResources.resources' (two-letter_culture_name + dot + neutral_resource_file_name).

This will lead to the following arguments for creating the instance:

The path argument is 'Altaxo.Resources' (default_namespace + dot + foldername).

The resourceName argument is 'StringResources'.

The assemblyContainingTheResources argument must refer to AltaxoCore.

path : string

The path to the resource. This is usually the default namespace, a dot, and the folders (separated by dots) where the resource file(s) reside. See remarks for how to name the neutral resource files and the resource files for other cultures.

resourceName : string

Name of the neutral (english) resource file (without the '.resource' extension.

assemblyContainingTheResources : Assembly

The assembly containing the resources.

Instance members

Instance member Description

this.GetString

Full Usage: this.GetString

Parameters:
Returns: string The resource string corresponding to the given resource key.

Gets a resource string for a given resource key.

resourceKey : StringResourceKey

The resource key.

Returns: string

The resource string corresponding to the given resource key.

this.GetString

Full Usage: this.GetString

Parameters:
    resourceKey : StringResourceKey - The resource key.
    fallbackToExampleValue : bool - If true, and the resource key is not found, the method will return the example value that comes with the resource key. If false, the method will return Null in this case.

Returns: string The resource string corresponding to the given resource key.

Gets a resource string for a given resource key.

resourceKey : StringResourceKey

The resource key.

fallbackToExampleValue : bool

If true, and the resource key is not found, the method will return the example value that comes with the resource key. If false, the method will return Null in this case.

Returns: string

The resource string corresponding to the given resource key.

Static members

Static member Description

StringResources.AltaxoCore

Full Usage: StringResources.AltaxoCore

Returns: StringResources

Gets the altaxo core string resources.

Returns: StringResources