C# Class NUnit.Framework.Internal.AssemblyHelper

AssemblyHelper provides static methods for working with assemblies.
ファイルを表示 Open project: nunit/nunit Class Usage Examples

Public Methods

Method Description
GetAssemblyName ( Assembly assembly ) : AssemblyName

Gets the AssemblyName of an assembly.

GetAssemblyPath ( Assembly assembly ) : string

Gets the path from which an assembly was loaded. For builds where this is not possible, returns the name of the assembly.

GetAssemblyPathFromCodeBase ( string codeBase ) : string

Gets the assembly path from code base.

Public for testing purposes

GetDirectoryName ( Assembly assembly ) : string

Gets the path to the directory from which an assembly was loaded.

Load ( string name ) : Assembly

Loads an assembly given a string, which is the AssemblyName

Private Methods

Method Description
IsFileUri ( string uri ) : bool

Method Details

GetAssemblyName() public static method

Gets the AssemblyName of an assembly.
public static GetAssemblyName ( Assembly assembly ) : AssemblyName
assembly System.Reflection.Assembly The assembly
return System.Reflection.AssemblyName

GetAssemblyPath() public static method

Gets the path from which an assembly was loaded. For builds where this is not possible, returns the name of the assembly.
public static GetAssemblyPath ( Assembly assembly ) : string
assembly System.Reflection.Assembly The assembly.
return string

GetAssemblyPathFromCodeBase() public static method

Gets the assembly path from code base.
Public for testing purposes
public static GetAssemblyPathFromCodeBase ( string codeBase ) : string
codeBase string The code base.
return string

GetDirectoryName() public static method

Gets the path to the directory from which an assembly was loaded.
public static GetDirectoryName ( Assembly assembly ) : string
assembly System.Reflection.Assembly The assembly.
return string

Load() public static method

Loads an assembly given a string, which is the AssemblyName
public static Load ( string name ) : Assembly
name string
return System.Reflection.Assembly