Esempio n. 1
0
        /// <summary>
        /// Bind an attribute to the given input, using the converter manager.
        /// </summary>
        /// <typeparam name="TType"></typeparam>
        /// <param name="builderInstance"></param>
        /// <returns></returns>
        public void BindToInput <TType>(IAsyncConverter <TAttribute, TType> builderInstance)
        {
            var bf = _parent.BindingFactory;

            var pm   = PatternMatcher.New(builderInstance);
            var rule = new BindToInputBindingProvider <TAttribute, TType>(bf.NameResolver, bf.ConverterManager, pm);

            Bind(rule);
        }
        // Common worker for BindToInput rules.
        private FluentBinder BindToInput <TType>(PatternMatcher pm)
        {
            var rule = new BindToInputBindingProvider <TAttribute, TType>(_configuration, _nameResolver, _converterManager, pm);

            return(Bind(rule));
        }