Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (14 sloc) 404 Bytes
using System;
using System.Linq;
using System.Reflection;
public static class DomainAssemblyResolver
{
public static void Connect()
{
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => GetAssembly(args.Name);
}
public static Assembly GetAssembly(string name)
{
return AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(x => x.FullName == name);
}
}