Class AssemblyExtensions
Inheritance
object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class AssemblyExtensions
Methods
View SourceGetRootDirectorySafe(Assembly)
Utility method that returns the path to the root of the application, by getting the path to where the assembly where this method is included is present, then traversing until it's past the /bin directory. Ie. this makes it work even if the assembly is in a /bin/debug or /bin/release folder
Declaration
public static string GetRootDirectorySafe(this Assembly executingAssembly)
Parameters
| Type | Name | Description |
|---|---|---|
| Assembly | executingAssembly |
Returns
| Type | Description |
|---|---|
| string |
IsAppCodeAssembly(Assembly)
Returns true if the assembly is the App_Code assembly
Declaration
public static bool IsAppCodeAssembly(this Assembly assembly)
Parameters
| Type | Name | Description |
|---|---|---|
| Assembly | assembly |
Returns
| Type | Description |
|---|---|
| bool |
IsGlobalAsaxAssembly(Assembly)
Returns true if the assembly is the compiled global asax.
Declaration
public static bool IsGlobalAsaxAssembly(this Assembly assembly)
Parameters
| Type | Name | Description |
|---|---|---|
| Assembly | assembly |
Returns
| Type | Description |
|---|---|
| bool |
TryGetInformationalVersion(Assembly, out string?)
Gets the assembly informational version for the specified assembly.
Declaration
public static bool TryGetInformationalVersion(this Assembly assembly, out string? version)
Parameters
| Type | Name | Description |
|---|---|---|
| Assembly | assembly | The assembly. |
| string | version | The assembly version. |
Returns
| Type | Description |
|---|---|
| bool |
|