C# Class GSoft.Dynamite.ServiceLocator.AppDomainContainers

Maintains AppDomain-wide root containers that automatically scan the GAC for Autofac dependency injection modules that derive from the Module Autofac base class.
Only the GAC_MSIL folder of the .NET 3.5 GAC (c:\windows\assembly) is scanned.
Show file Open project: GSoft-SharePoint/Dynamite-2010

Public Methods

Method Description
CurrentContainer ( string appRootNamespace ) : IContainer

Returns a service locator instance for the entire application (i.e. throughout the current AppDomain). Acts as root Container for all other child lifetime scopes. Hosts all singletons that are registered as SingleInstance(). Whenever applicable, prefer creating a child lifetime scope instead of resolving directly for this root Container instance.

CurrentContainer ( string appRootNamespace, bool>.Func assemblyFileNameMatcher ) : IContainer

The current container.

Private Methods

Method Description
ScanGacForAutofacModulesAndCreateContainer ( string appRootNamespace, bool>.Func assemblyFileNameMatchingPredicate ) : IContainer

Method Details

CurrentContainer() public static method

Returns a service locator instance for the entire application (i.e. throughout the current AppDomain). Acts as root Container for all other child lifetime scopes. Hosts all singletons that are registered as SingleInstance(). Whenever applicable, prefer creating a child lifetime scope instead of resolving directly for this root Container instance.
public static CurrentContainer ( string appRootNamespace ) : IContainer
appRootNamespace string The key of the current app
return IContainer

CurrentContainer() public static method

The current container.
public static CurrentContainer ( string appRootNamespace, bool>.Func assemblyFileNameMatcher ) : IContainer
appRootNamespace string /// The app root namespace. ///
assemblyFileNameMatcher bool>.Func /// The assembly file name matcher. ///
return IContainer