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
entryAssemblyAssemblyThe assembly containing embedded resources
defaultNamespacestringDefault namespace for embedded resources
Fields
Instance
For entry assembly
public static EmbeddedResourcesH? Instance
Field Value
Properties
CurrentEntryAssembly
Gets the current entry assembly, initializing it if necessary
protected Assembly CurrentEntryAssembly { get; }
Property Value
DefaultNamespace
Default namespace for embedded resources
protected string DefaultNamespace { get; set; }
Property Value
EntryAssembly
Entry assembly containing embedded resources
protected Assembly? EntryAssembly { get; set; }
Property Value
Methods
GetResourceName(string)
Converts a file path to a resource name by combining with default namespace
public string GetResourceName(string path)
Parameters
pathstringThe resource path
Returns
- string
The full resource name
GetStream(string)
Resources/tidy_config.txt (no assembly)
public Stream GetStream(string path)
Parameters
pathstringThe 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
pathstringThe resource path
Returns
- string
The resource content as string