Mercurial > pub > bltoolkit
comparison Tools/NUnitAddin/Class1.cs @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f990fcb411a9 |
---|---|
1 using System; | |
2 using System.Reflection; | |
3 | |
4 using NUnit.Core.Extensibility; | |
5 | |
6 namespace NUnitAddin | |
7 { | |
8 [NUnitAddin] | |
9 public class AssemblyResolverAddin : IAddin | |
10 { | |
11 public bool Install(IExtensionHost host) | |
12 { | |
13 AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => | |
14 { | |
15 var dir = Environment.CurrentDirectory; | |
16 | |
17 if (args.Name.IndexOf("Sybase.AdoNet2.AseClient") >= 0) | |
18 return Assembly.LoadFrom(@"..\..\..\..\Redist\Sybase\Sybase.AdoNet2.AseClient.dll"); | |
19 if (args.Name.IndexOf("Oracle.DataAccess") >= 0) | |
20 return Assembly.LoadFrom(@"..\..\..\..\Redist\Oracle\Oracle.DataAccess.dll"); | |
21 if (args.Name.IndexOf("IBM.Data.DB2") >= 0) | |
22 return Assembly.LoadFrom(@"..\..\..\..\Redist\IBM\IBM.Data.DB2.dll"); | |
23 if (args.Name.IndexOf("Mono.Security") >= 0) | |
24 return Assembly.LoadFrom(@"..\..\..\..\Redist\PostgreSql\Mono.Security.dll"); | |
25 | |
26 return null; | |
27 }; | |
28 | |
29 return true; | |
30 } | |
31 } | |
32 } |