1

For example an answer to this question by Mark Seemann was this: container.Register(AllTypes.FromAssemblyInDirectory(new AssemblyFilter(folderPath)));

This would register all assemblies in a given directory, including 3rd party assemblies that I am not interested in.

I only want to register a list of assemblies in a directory, and the second part I am not sure how to do, is to apply my interceptors to the assemblies in that list.

So I am asking how would I do that?

Community
  • 1
  • 1
OutOFTouch
  • 1,017
  • 3
  • 13
  • 30

1 Answers1

0

I am not sure if this will work but I am thinking something like this:

foreach (var referencedAssembly in referencedAssemblies)
            {
                base.BootStrapContainer.Register(
                    Classes.FromAssemblyNamed(referencedAssembly)
                           .IncludeNonPublicTypes()
                           .Pick()
                           .Configure(component => component.Interceptors<TracingAspect>()));

            }
OutOFTouch
  • 1,017
  • 3
  • 13
  • 30