C# Class NUnit.Framework.Internal.AssemblyHelper

AssemblyHelper provides static methods for working with assemblies.
Afficher le fichier Open project: nunit/nunit Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
IsFileUri ( string uri ) : bool

Method Details

GetAssemblyName() public static méthode

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

GetAssemblyPath() public static méthode

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.
Résultat string

GetAssemblyPathFromCodeBase() public static méthode

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

GetDirectoryName() public static méthode

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

Load() public static méthode

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