Class AppDomainExtensions
A static class that contains extension methods for the System.AppDomain class.
Inheritance
Inherited Members
Namespace: Juhta.Net.Extensions
Assembly: Juhta.Net.dll
Syntax
public static class AppDomainExtensions
Methods
| Improve this Doc View SourceGetAssemblyByFileName(AppDomain, String)
Gets a loaded assembly by an assembly file name.
Declaration
public static Assembly GetAssemblyByFileName(this AppDomain appDomain, string assemblyFileName)
Parameters
Type | Name | Description |
---|---|---|
System.AppDomain | appDomain | Specifies the current AppDomain instance. |
System.String | assemblyFileName | Specifies an assembly file name. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | Returns the first loaded Assembly instance whose Location property's file name part matches the specified assembly file name, or null, if no match was found. |
GetAssemblyByPath(AppDomain, String)
Gets a loaded assembly by an assembly path.
Declaration
public static Assembly GetAssemblyByPath(this AppDomain appDomain, string assemblyPath)
Parameters
Type | Name | Description |
---|---|---|
System.AppDomain | appDomain | Specifies the current AppDomain instance. |
System.String | assemblyPath | Specifies an assembly path. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | Returns the first loaded Assembly instance whose Location property ends with the specified assembly path, or null, if no match was found. |
Remarks
The path specified by assemblyPath
does not necessarily have to be absolute.
GetAssemblyByTypeName(AppDomain, String)
Gets a loaded assembly by a type name.
Declaration
public static Assembly GetAssemblyByTypeName(this AppDomain appDomain, string typeName)
Parameters
Type | Name | Description |
---|---|---|
System.AppDomain | appDomain | Specifies the current AppDomain instance. |
System.String | typeName | Specifies a full type name. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | Returns the first loaded assembly that contains the specified type, or null, if the type was not found in any loaded assembly. |