Ejemplo n.º 1
0
        public object Convert(object value, Type targetType,
                              object parameter, System.Globalization.CultureInfo culture)
        {
            string convertCode = parameter.GetValueAt <string>(0);

            ConvertCode = convertCode.IsNullOrWhiteSpace() ? ConvertCode : convertCode;
            if (ConvertCode.IsNullOrWhiteSpace())
            {
                return(value);
            }

            if (this.ConvertOperation == null)
            {
                this.ConvertOperation = ConstructOperation(ConvertCode, value);
            }
            return(System.Convert.ChangeType(ConvertOperation.ExecuteFunc(value), targetType));
        }