Class AssemblyExtensions
- Namespace
- AetherUtils.Core.Extensions
- Assembly
- AetherUtils.Core.dll
Provides extension methods for getting data from an Assembly.
public static class AssemblyExtensions
- Inheritance
-
AssemblyExtensions
- Inherited Members
Methods
AddFontResource(Assembly, string, PrivateFontCollection)
Get the specified embedded font resource from the Assembly and add it
to the PrivateFontCollection.
public static PrivateFontCollection AddFontResource(this Assembly assembly, string resourceName, PrivateFontCollection fontCollection)
Parameters
assemblyAssembly- The Assembly to read the resource from.
resourceNamestring- The name of the resource, including the namespace.
fontCollectionPrivateFontCollection- The PrivateFontCollection to add the read font to.
Returns
- PrivateFontCollection
- The modified PrivateFontCollection after the font has been added, or the original PrivateFontCollection if the font could not be added.
GetResourceAsStream(Assembly, string)
Get the specified embedded resource from the Assembly as a raw stream.
[UsedImplicitly]
public static Stream? GetResourceAsStream(this Assembly assembly, string resourceName)
Parameters
assemblyAssembly- The Assembly to read the resource from.
resourceNamestring- The name of the resource, including the namespace.
Returns
GetStringResource(Assembly, string)
Get the specified embedded resource from the Assembly.
[UsedImplicitly]
public static string? GetStringResource(this Assembly assembly, string resourceName)
Parameters
assemblyAssembly- The Assembly to read the resource from.
resourceNamestring- The name of the resource, including the namespace.
Returns
- string
- A string representing the resource, or
nullif the resource wasn't found.