Table of Contents

Class EmbeddedResourcesH

Namespace
SunamoEmbeddedResources
Assembly
SunamoEmbeddedResources.dll

Require assembly and default namespace. Content is referred like with ResourcesH - with fs path

public class EmbeddedResourcesH
Inheritance
EmbeddedResourcesH
Inherited Members
Extension Methods

Constructors

EmbeddedResourcesH()

Protected constructor for derived classes

protected EmbeddedResourcesH()

EmbeddedResourcesH(Assembly, string)

public to use in assembly like SunamoNTextCat A2 is name of project, therefore don't insert typeResourcesSunamo.Namespace

public EmbeddedResourcesH(Assembly entryAssembly, string defaultNamespace)

Parameters

entryAssembly Assembly

The assembly containing embedded resources

defaultNamespace string

Default namespace for embedded resources

Fields

Instance

For entry assembly

public static EmbeddedResourcesH? Instance

Field Value

EmbeddedResourcesH

Properties

CurrentEntryAssembly

Gets the current entry assembly, initializing it if necessary

protected Assembly CurrentEntryAssembly { get; }

Property Value

Assembly

DefaultNamespace

Default namespace for embedded resources

protected string DefaultNamespace { get; set; }

Property Value

string

EntryAssembly

Entry assembly containing embedded resources

protected Assembly? EntryAssembly { get; set; }

Property Value

Assembly

Methods

GetResourceName(string)

Converts a file path to a resource name by combining with default namespace

public string GetResourceName(string path)

Parameters

path string

The resource path

Returns

string

The full resource name

GetStream(string)

Resources/tidy_config.txt (no assembly)

public Stream GetStream(string path)

Parameters

path string

The resource path

Returns

Stream

The manifest resource stream

GetString(string)

If it's file, return its content Its for getting string from file, never from resx or another in code variable

public string GetString(string path)

Parameters

path string

The resource path

Returns

string

The resource content as string