You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 2, 2020. It is now read-only.
Acoustic edited this page Sep 14, 2010
·
2 revisions
Configuring Snap with LinFu
Dependency
Version
Snap
Current
Snap.Autofac.dll
Current
LinFu.Core.dll
v2.0.x
Configuration
LinFu uses the concept of a service container to create object instances. Because the container builder is an instantiated object, it’s necessary to use Snap’s instance-based fluent configuration.
// Create a LinFu ServiceContainer
var container = new ServiceContainer();
container.LoadFrom(AppDomain.CurrentDomain.BaseDirectory, "*.dll");
// Configure Snap with the container instance
SnapConfiguration.For(new LinFuAspectContainer(container)).Configure(c =>
{
c.IncludeNamespaceRoot("My.Namespace.Root");
//c.IncludeNamespace("My.Namespace*");
c.Bind<HandleErrorInterceptor>().To<HandleErrorAttribute>();
});
LinFu is now fully configured to build proxied instances that will run your configured interceptors.