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

            return(expr);
        }
Exemplo n.º 2
0
        public IFormatterExpression ForSourceType <TSource>()
        {
            var valueFormatter = new FormatterExpression(_formatterCtor);

            _typeSpecificFormatters[typeof(TSource)] = valueFormatter;

            return(valueFormatter);
        }