Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #4
0
        public static ResolverConfig UseInitializeProcessor(this ResolverConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            config.Components.Add <IInjector, PropertyInjector>();
            return(config);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }