C# Class PerpetualEngine.EmbeddedResourceLoader

Utility class that can be used to find and load embedded resources into memory. Taken from the Xamarin example project https://github.com/xamarin/mobile-samples/tree/master/EmbeddedResources
Exibir arquivo Open project: perpetual-mobile/PerpetualEngine

Public Methods

Method Description
GetEmbeddedResourceBytes ( Assembly assembly, string resourceFileName ) : byte[]

Attempts to find and return the given resource from within the specified assembly.

GetEmbeddedResourceBytes ( string resourceFileName ) : byte[]

Attempts to find and return the given resource from within the calling assembly.

GetEmbeddedResourceStream ( Assembly assembly, string resourceFileName ) : Stream

Attempts to find and return the given resource from within the specified assembly.

GetEmbeddedResourceStream ( string resourceFileName ) : Stream

Attempts to find and return the given resource from within the calling assembly.

GetEmbeddedResourceString ( Assembly assembly, string resourceFileName ) : string

Attempts to find and return the given resource from within the specified assembly.

GetEmbeddedResourceString ( string resourceFileName ) : string

Attempts to find and return the given resource from within the calling assembly.

Method Details

GetEmbeddedResourceBytes() public static method

Attempts to find and return the given resource from within the specified assembly.
public static GetEmbeddedResourceBytes ( Assembly assembly, string resourceFileName ) : byte[]
assembly System.Reflection.Assembly Assembly.
resourceFileName string Resource file name.
return byte[]

GetEmbeddedResourceBytes() public static method

Attempts to find and return the given resource from within the calling assembly.
public static GetEmbeddedResourceBytes ( string resourceFileName ) : byte[]
resourceFileName string Resource file name.
return byte[]

GetEmbeddedResourceStream() public static method

Attempts to find and return the given resource from within the specified assembly.
public static GetEmbeddedResourceStream ( Assembly assembly, string resourceFileName ) : Stream
assembly System.Reflection.Assembly Assembly.
resourceFileName string Resource file name.
return Stream

GetEmbeddedResourceStream() public static method

Attempts to find and return the given resource from within the calling assembly.
public static GetEmbeddedResourceStream ( string resourceFileName ) : Stream
resourceFileName string Resource file name.
return Stream

GetEmbeddedResourceString() public static method

Attempts to find and return the given resource from within the specified assembly.
public static GetEmbeddedResourceString ( Assembly assembly, string resourceFileName ) : string
assembly System.Reflection.Assembly Assembly.
resourceFileName string Resource file name.
return string

GetEmbeddedResourceString() public static method

Attempts to find and return the given resource from within the calling assembly.
public static GetEmbeddedResourceString ( string resourceFileName ) : string
resourceFileName string Resource file name.
return string