public void Process(Type type, StructureMap.Configuration.DSL.Registry registry) { if (type.CanBeCastTo(typeof(Controller)) && !type.IsAbstract) { registry.For(type).LifecycleIs(new UniquePerRequestLifecycle()); } }