Class ResourceFiles
- Namespace
- Tripous
- Assembly
- Tripous.dll
Helper for embedded resource files.
public static class ResourceFiles
- Inheritance
-
ResourceFiles
- Inherited Members
Methods
FindResourcePath(Assembly, string, string)
Finds the full resource path.
FindResourcePath(Assembly, "Models/Ddl", "Schema.sql")
public static string FindResourcePath(Assembly A, string FolderPath, string FileName)
Parameters
Returns
FindResourcePath(Assembly, string, string, string)
Finds the full resource path using a base namespace.
FindResourcePath(Assembly, "Tripous.Data", "Sql", "MyFile.sql")
public static string FindResourcePath(Assembly A, string BaseNamespace, string FolderPath, string FileName)
Parameters
Returns
GetResourceFileData(Assembly, string, string)
Returns the raw data of a resource using simple path matching.
public static byte[] GetResourceFileData(Assembly A, string FolderPath, string FileName)
Parameters
Returns
- byte[]
GetResourceFileData(Assembly, string, string, string)
Returns the raw data of a resource.
public static byte[] GetResourceFileData(Assembly A, string BaseNamespace, string FolderPath, string FileName)
Parameters
Returns
- byte[]
GetResourceFilePaths(Assembly)
Returns all resource names in the assembly.
public static string[] GetResourceFilePaths(Assembly A)
Parameters
AAssembly
Returns
- string[]
GetResourceFileStream(Assembly, string, string, string)
Returns a stream for the specified resource.
public static Stream GetResourceFileStream(Assembly A, string BaseNamespace, string FolderPath, string FileName)
Parameters
Returns
GetResourceFileText(Assembly, string, string)
Returns the text content of a resource using simple path matching.
public static string GetResourceFileText(Assembly A, string FolderPath, string FileName)
Parameters
Returns
GetResourceFileText(Assembly, string, string, string)
Returns the text content of a resource.
string Sql = GetResourceFileText(A, "Tripous.Data", "Sql", "Init.sql")
public static string GetResourceFileText(Assembly A, string BaseNamespace, string FolderPath, string FileName)
Parameters
Returns
ResourceFileExists(Assembly, string, string)
Returns true if the resource exists.
ResourceFileExists(typeof(MyClass).Assembly, "Sql.Scripts", "MyFile.sql")
public static bool ResourceFileExists(Assembly A, string FolderPath, string FileName)