public AssemblyResolver(ILogger logger, params string[] rootSearchPaths)
{
if (logger == null)
{
throw new ArgumentNullException("logger");
}
if (rootSearchPaths == null || rootSearchPaths.Length < 1)
{
throw new ArgumentException(Resources.Resolver_ConstructorNoPaths, "rootSearchPaths");
}
this.ResolverCalled = true;
this.rootSearchPaths = rootSearchPaths;
this.logger = logger;
// This line required to resolve the Resources object before additional assembly resolution is added
// Do not remove this line, otherwise CurrentDomain_AssemblyResolve will throw a StackOverflowException
this.logger.LogDebug(Resources.Resolver_Initialize);
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}