Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Feb 06, 2011 04:22 AM|LINK
Here is some simple code that configures a UnityContainer, registers a few different types of loggers and then gets a handle to one of the logger types:
IUnityContainer container = new
var logger = container.Resolve<ILogger>("FileLogger");
I think this standalone code is fairly straightforward. However, I am curious about the best way to access this code in an application.
Seems like it might be easiest to include this config code in an AppConfig.cs class and then reference the AppConfig.cs class as a Singleton throughout the application.
I need to implement Unity for the first time in a business app. How do you normally choose to implement Unity in your business apps?