internal FormatterExpression GetProfile(string profileName)
        {
            FormatterExpression expr = _formatterProfiles.GetOrAdd(profileName,
                                                                   name => new FormatterExpression(t => (IValueFormatter)_serviceCtor(t)));

            return(expr);
        }
示例#2
0
        public IFormatterExpression ForSourceType <TSource>()
        {
            var valueFormatter = new FormatterExpression(_formatterCtor);

            _typeSpecificFormatters[typeof(TSource)] = valueFormatter;

            return(valueFormatter);
        }