Table of Contents

Class ResourcesHelper

Namespace
SunamoLang.SunamoXlf
Assembly
SunamoLang.dll

Helper class for loading from *.resources and *.resx files. Usage: ThisApp.Resources = ResourcesHelper.Create("sunamo.Properties.Resources", typeof(ResourcesHelper).Assembly) When the joined file changes, the content update is also reflected in the *.resx file.

public class ResourcesHelper
Inheritance
ResourcesHelper
Inherited Members
Extension Methods

Methods

Create(string, Assembly)

Creates a ResourcesHelper instance for the specified resource class.

public static ResourcesHelper Create(string resourceClass, Assembly assembly)

Parameters

resourceClass string

The resource class name without extension and language specifier (e.g., MyApp.MyResource for MyApp.MyResource.en-US.resx).

assembly Assembly

The assembly containing the resources.

Returns

ResourcesHelper

A new ResourcesHelper instance.

GetByteArrayAsString(string)

Gets a byte array resource as a UTF-8 string.

public string GetByteArrayAsString(string name)

Parameters

name string

The resource name.

Returns

string

The byte array resource converted to a UTF-8 string.

GetString(string)

Gets a string resource by name.

public string? GetString(string name)

Parameters

name string

The resource name.

Returns

string

The string value of the resource.