protected void Setup(FeatureConfigurationContext context) { var scope = context.Settings.GetOrDefault <ILifetimeScope>("ExistingLifetimeScope"); if (scope == null) { return; } InProcFactory.Scope = scope; InProcFactory.SetGenericResolver(scope.ComponentRegistry.Registrations.Select(r => r.Activator.LimitType).ToArray()); InProcFactory.SetDefaultServiceBehaviour(new AuditInterceptorServiceBehavior(), new ErrorHandlerServiceBehaviour()); Start(); }