View Source
Class AssemblyExtensions
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class AssemblyExtensions
Methods
View Source
GetAssemblyFile(Assembly)
Returns the file used to load the assembly
Declaration
public static FileInfo GetAssemblyFile(this Assembly assembly)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
assembly |
|
Returns
Type |
Description |
FileInfo |
|
View Source
GetAssemblyFile(AssemblyName)
Returns the file used to load the assembly
Declaration
public static FileInfo? GetAssemblyFile(this AssemblyName assemblyName)
Parameters
Type |
Name |
Description |
System.Reflection.AssemblyName |
assemblyName |
|
Returns
Type |
Description |
System.Nullable<FileInfo> |
|
View Source
GetRootDirectorySafe(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 |
System.Reflection.Assembly |
executingAssembly |
|
Returns
Type |
Description |
System.String |
|
View Source
IsAppCodeAssembly(Assembly)
Returns true if the assembly is the App_Code assembly
Declaration
public static bool IsAppCodeAssembly(this Assembly assembly)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
assembly |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
IsGlobalAsaxAssembly(Assembly)
Returns true if the assembly is the compiled global asax.
Declaration
public static bool IsGlobalAsaxAssembly(this Assembly assembly)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
assembly |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Gets the assembly informational version for the specified assembly
.
Declaration
public static bool TryGetInformationalVersion(this Assembly assembly, out string version)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
assembly |
The assembly.
|
System.String |
version |
The assembly version.
|
Returns
Type |
Description |
System.Boolean |
true if the assembly information version is retrieved; otherwise, false .
|