Пример #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);
        }