protected void InitializeContainerManager()
        {
            if (_containerManager == null)
            {
                var catalog = CreateRootCatalog();

                _containerManager = new ScopedContainerManager(catalog);
            }
        }
 public MefControllerFactory(ScopedContainerManager scopeManager)
 {
     this._scopeManager = scopeManager;
     _allowExperimentalFeatures =
         Convert.ToBoolean(WebConfigurationManager.AppSettings["EnableExperimentalFeatures"]);
 }
 public MefDependencyResolver(ScopedContainerManager containerManager)
 {
     _containerManager = containerManager;
 }
 public MefFilterAttributeProvider(ScopedContainerManager scopeManager) :base(false)
 {
     _scopeManager = scopeManager;
 }
        public static void Register(ScopedContainerManager containerManager)
        {
            var oldProvider = FilterProviders.Providers.Single(
                f => f is FilterAttributeFilterProvider
                );
            FilterProviders.Providers.Remove(oldProvider);

            var provider = new MefFilterAttributeProvider(containerManager);
            FilterProviders.Providers.Add(provider);
        }