AssemblyHelper
AssemblyHelper provides static methods for working
with assemblies.
using System.IO;
using System.Reflection;
namespace NUnit.Framework.Internal
{
public static class AssemblyHelper
{
public static string GetAssemblyPath(Assembly assembly)
{
return assembly.ManifestModule.FullyQualifiedName;
}
public static AssemblyName GetAssemblyName(Assembly assembly)
{
return new AssemblyName(assembly.FullName);
}
public static Assembly Load(string name)
{
string extension = Path.GetExtension(name);
if (extension == ".dll" || extension == ".exe")
name = Path.GetFileNameWithoutExtension(name);
return Assembly.Load(new AssemblyName {
Name = name
});
}
}
}