예제 #1
0
        public static ResolverConfig UseProcessor(this ResolverConfig config, IProcessor activator)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add(typeof(IProcessor), activator);
            return(config);
        }
예제 #2
0
        public static ResolverConfig UseInjector(this ResolverConfig config, IInjector injector)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add(typeof(IInjector), injector);
            return(config);
        }
예제 #3
0
        public static ResolverConfig UseMetadataFactory(this ResolverConfig config, IMetadataFactory metadataFactory)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add(typeof(IMetadataFactory), metadataFactory);
            return(config);
        }
예제 #4
0
        public static ResolverConfig UseInitializeProcessor(this ResolverConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add <IInjector, PropertyInjector>();
            return(config);
        }
예제 #5
0
        public static ResolverConfig UseMissingHandler(this ResolverConfig config, IMissingHandler handler)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add(typeof(IMissingHandler), handler);
            return(config);
        }
예제 #6
0
        public static ResolverConfig UseMissingHandler <T>(this ResolverConfig config)
            where T : IMissingHandler
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add(typeof(IMissingHandler), typeof(T));
            return(config);
        }
예제 #7
0
        public static ResolverConfig UseProcessor <T>(this ResolverConfig config)
            where T : IProcessor
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add(typeof(IProcessor), typeof(T));
            return(config);
        }
예제 #8
0
        public static ResolverConfig UseMetadataFactory <T>(this ResolverConfig config)
            where T : IMetadataFactory
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add(typeof(IMetadataFactory), typeof(T));
            return(config);
        }