BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | Properties | List of all members
BogaNet.Helper.ResourceHelper Class Referenceabstract

Helper for resources in Avalonia. More...

Static Public Member Functions

static string ValidateResource (string resourcePath, string? resourceAssembly=null)
 Validates a given resource path.
 
static string LoadText (string resourcePath, string? resourceAssembly=null)
 Reads a resource as text.
 
static async Task< string > LoadTextAsync (string resourcePath, string? resourceAssembly=null)
 Reads a resource as text asynchronously.
 
static byte[] LoadBinary (string resourcePath, string? resourceAssembly=null)
 Reads a resource as binary.
 
static async Task< byte[]> LoadBinaryAsync (string resourcePath, string? resourceAssembly=null)
 Reads a resource as binary asynchronously.
 

Properties

static ? string ResourceAssembly [get, set]
 Main assembly containing the resources.
 

Detailed Description

Helper for resources in Avalonia.

Member Function Documentation

◆ LoadBinary()

static byte[] BogaNet.Helper.ResourceHelper.LoadBinary ( string resourcePath,
string? resourceAssembly = null )
static

Reads a resource as binary.

Parameters
resourcePath
resourceAssemblyAssembly with the resource (optional, default: ResourceAssembly)
Returns
Binary data from the given resource
Exceptions
ArgumentNullException

◆ LoadBinaryAsync()

static async Task< byte[]> BogaNet.Helper.ResourceHelper.LoadBinaryAsync ( string resourcePath,
string? resourceAssembly = null )
static

Reads a resource as binary asynchronously.

Parameters
resourcePath
resourceAssemblyAssembly with the resource (optional, default: ResourceAssembly)
Returns
Binary data from the given resource
Exceptions
ArgumentNullException

◆ LoadText()

static string BogaNet.Helper.ResourceHelper.LoadText ( string resourcePath,
string? resourceAssembly = null )
static

Reads a resource as text.

Parameters
resourcePath
resourceAssemblyAssembly with the resource (optional, default: ResourceAssembly)
Returns
Text from the given resource
Exceptions
ArgumentNullException

◆ LoadTextAsync()

static async Task< string > BogaNet.Helper.ResourceHelper.LoadTextAsync ( string resourcePath,
string? resourceAssembly = null )
static

Reads a resource as text asynchronously.

Parameters
resourcePath
resourceAssemblyAssembly with the resource (optional, default: ResourceAssembly)
Returns
Text from the given resource
Exceptions
ArgumentNullException

◆ ValidateResource()

static string BogaNet.Helper.ResourceHelper.ValidateResource ( string resourcePath,
string? resourceAssembly = null )
static

Validates a given resource path.

Parameters
resourcePathResource path to validate
resourceAssemblyAssembly with the resource (optional, default: ResourceAssembly)
Returns
Validated resource path
Exceptions
ArgumentNullException

Property Documentation

◆ ResourceAssembly

? string BogaNet.Helper.ResourceHelper.ResourceAssembly
staticgetset

Main assembly containing the resources.


The documentation for this class was generated from the following file: