ResourceHelper Class
Represents a collection of helper methods when working with resources.
public static class ResourceHelper
- Inheritance:
- Object Object
Methods
GetLocationUri(Assembly, String)
public static Uri GetLocationUri(Assembly assembly, string relativeLocation)
Parameter | Type | Description |
---|---|---|
assembly | Assembly | The Assembly that contains the resource. |
relativeLocation | String | The relative location of the resource file within the assembly.
The location must start NOT with a .
|
Returns
GetLocationUri(Assembly, String, Boolean, Boolean)
public static Uri GetLocationUri(Assembly assembly, string relativeLocation, bool includePackPrefix, bool includeAssemblyVersion)
Parameter | Type | Description |
---|---|---|
assembly | Assembly | The Assembly that contains the resource. |
relativeLocation | String | The relative location of the resource file within the assembly.
The location must start NOT with a .
|
includePackPrefix | Boolean | if set to |
includeAssemblyVersion | Boolean | if set to |
Returns
GetLocationUriString(Assembly, String)
Returns a string-representation of a pack URI based on the specified parameters, that can be used to construct a Uri.
public static string GetLocationUriString(Assembly assembly, string relativeLocation)
Parameter | Type | Description |
---|---|---|
assembly | Assembly | The Assembly that contains the resource. |
relativeLocation | String | The relative location of the resource file within the assembly.
The location must start NOT with a .
|
Returns
- String:
A string-representation of a pack URI.
GetLocationUriString(Assembly, String, Boolean, Boolean)
Returns a string-representation of a pack URI based on the specified parameters, that can be used to construct a Uri.
public static string GetLocationUriString(Assembly assembly, string relativeLocation, bool includePackPrefix, bool includeAssemblyVersion)
Parameter | Type | Description |
---|---|---|
assembly | Assembly | The Assembly that contains the resource. |
relativeLocation | String | The relative location of the resource file within the assembly.
The location must start NOT with a .
|
includePackPrefix | Boolean | if set to |
includeAssemblyVersion | Boolean | if set to |
Returns
- String:
A string-representation of a pack URI.
GetLocationUriStringBase(Assembly)
Returns a string-representation of a base pack URI based on the specified parameters, that can be used to construct a Uri.
public static string GetLocationUriStringBase(Assembly assembly)
Parameter | Type | Description |
---|---|---|
assembly | Assembly | The Assembly that contains the resource. |
Returns
- String:
A string-representation of a base pack URI.