The following steps are required to wireup your application in Application_Start - typically found in your asax file.

Area Registration

Important! Do this before controller registration

Area Registration.RegisterAllAreas();

Controller Registration with IoC

Because each IoC container does this slightly different, we'll focus on the commonality here. The IoC containers want to see a list of assemblies that they need to interrogate for 'Controller' implementations. You can grab the list of required assemblies from Growl using the following:

var growlAssemblies = GrowlConfig.ControllerAssemblies;

This line returns an array of assemblies. Add your local assembly or assemblies to this list and hand that list to your container.

Register Growl types with IoC.

While there are two projects dedicated to the handling of this, they are IoC container specific. The following interfaces, implementations and lifetime scoping requirements are listed below:

Interface Concrete Type Scoping
IGrowlRecorder GrowlRecorder Http Request
IGrowlRenderer GrowlRenderer Http Request
ISession SessionWrapper Http Request
IScopedCache<string, IList<IGrowlMessage>> GrowlMessageCache(System.Web.Caching.Cache instance) Singleton

Last edited Jul 23, 2010 at 9:50 AM by sdhebert, version 2


No comments yet.