Skip to content

Instantly share code, notes, and snippets.

@khellang
Created September 25, 2013 11:25
Show Gist options
  • Select an option

  • Save khellang/6698317 to your computer and use it in GitHub Desktop.

Select an option

Save khellang/6698317 to your computer and use it in GitHub Desktop.
AppDomainAssemblyTypeScanner.DefaultAssembliesToScan = new Func<Assembly, bool>[]
{
x => x == typeof(NancyEngine).Assembly,
x => ShouldReference(x)
};
public static bool ShouldReference(Assembly assembly)
{
var assemblyName = assembly.GetName().Name;
if (assemblyName.EndsWith(".mm.dll")) return false;
return !assemblyName.StartsWith("Nancy.Testing",StringComparison.OrdinalIgnoreCase) &&
assembly.GetReferencedAssemblies().Any(r => r.Name.StartsWith("Nancy", StringComparison.OrdinalIgnoreCase));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment