How can I manage the lifetime of my services in mvc turbine (using Unity)?
I have an ISearchService implementation LuceneSearchService that takes an IConfigurationService and ILoggerService.
Currently my searchservice registration looks like this:
public class SearchServiceRegistration: IServiceRegistration
{
public void Register(IServiceLocator locator)
{
locator.Register<ISearchService, LuceneSearchService>();
}
}
I would like to keep the responsibility of creating the instance in Turbine, but I want it to be a singleton.
Or in other words, how can I define the lifetime?