예제 #1
0
        /// <summary>
        /// Registers the filter providers.
        /// </summary>
        /// <param name="unityContainer"></param>
        public static void RegisterFilterProviders(IUnityContainer unityContainer)
        {
            var defaultProvider = FilterProviders.Providers.Single(fp => fp is FilterAttributeFilterProvider);
            FilterProviders.Providers.Remove(defaultProvider);

            var provider = new FilterAttributeProvider(unityContainer);
            FilterProviders.Providers.Add(provider);
        }
예제 #2
0
        /// <summary>
        /// Registers the filter providers.
        /// </summary>
        /// <param name="unityContainer"></param>
        public static void RegisterFilterProviders(IUnityContainer unityContainer)
        {
            var defaultProvider = FilterProviders.Providers.Single(fp => fp is FilterAttributeFilterProvider);

            FilterProviders.Providers.Remove(defaultProvider);

            var provider = new FilterAttributeProvider(unityContainer);

            FilterProviders.Providers.Add(provider);
        }