Exemplo n.º 1
0
            public ValueBinder <TParams, TField> Compile(bool withDefaults)
            {
                IEnumerable <Converter <TField> > converters;

                if (withDefaults)
                {
                    Converter <TField>[] defaultConverters = DefaultConverters.To <TField>();
                    if (Converters.Count > 0)
                    {
                        Converters.AddRange(defaultConverters);
                        converters = Converters;
                    }
                    else
                    {
                        converters = defaultConverters;
                    }
                }
                else
                {
                    converters = Converters;
                }
                return(new ValueBinder <TParams, TField>(
                           Member?.Name,
                           CompileGetter(Member),
                           converters));
            }