Class ResourceLoader
Loads resources embedded in the assembly.
Namespace: Evergine.Common.IO
Assembly: Evergine.Common.dll
Syntax
public static class ResourceLoader
Methods
EmbeddedResourceExists(Assembly, string)
Embeds the resource if it exists.
Declaration
public static bool EmbeddedResourceExists(Assembly targetAssembly, string name)
Parameters
Type | Name | Description |
---|---|---|
Assembly | targetAssembly | The target assembly. |
string | name | The name. |
Returns
Type | Description |
---|---|
bool | Returns a System.Boolean. |
GetEmbeddedResourceData(Assembly, string)
Gets the embedded resource data.
Declaration
public static byte[] GetEmbeddedResourceData(Assembly targetAssembly, string name)
Parameters
Type | Name | Description |
---|---|---|
Assembly | targetAssembly | The target assembly. |
string | name | The resource name. |
Returns
Type | Description |
---|---|
byte[] | The resource data. |
GetEmbeddedResourceStream(Assembly, string)
Gets the embedded resource stream.
Declaration
public static Stream GetEmbeddedResourceStream(Assembly targetAssembly, string name)
Parameters
Type | Name | Description |
---|---|---|
Assembly | targetAssembly | The target assembly. |
string | name | The resource name. |
Returns
Type | Description |
---|---|
Stream | The resource stream. |
GetEmbeddedTextFile(Assembly, string)
Gets the embedded text file.
Declaration
public static string GetEmbeddedTextFile(Assembly targetAssembly, string name)
Parameters
Type | Name | Description |
---|---|---|
Assembly | targetAssembly | The target assembly. |
string | name | The file name. |
Returns
Type | Description |
---|---|
string | The resource string. |