DeviceResources
Namespace: Wisej.Hybrid
Assembly: Wisej.Hybrid
Provides methods for accessing resources embedded within the Hybrid client application.
- C#
- VB.NET
public class DeviceResources
Public Class DeviceResources
Access this class through the Device singleton.
Constructors
DeviceResources()
Initializes a new instance of DeviceResources.
Methods
GetBytes(resource)
Gets a byte array of the given resource if it exists.
| Parameter | Type | Description |
|---|---|---|
| resource | String | The name of the resource or relative path from the project root. |
Returns: Byte[]. The resource byte array.
A HybridAsset: /Assets/image.png can be accessed using "image.png" if only one HybridAsset named "image.png" exists or "/Assets/image.png".
GetStream(resource)
Gets a stream of the given resource if it exists.
| Parameter | Type | Description |
|---|---|---|
| resource | String | The name of the resource or relative path from the project root. |
Returns: MemoryStream. The resource stream.