示例#1
0
        /// <summary>
        /// 表缺失字典:10表示源存在;01表示目标存在;11表示都存在
        /// </summary>
        /// <param name="equal"></param>
        /// <returns></returns>
        public static string GetEqualValue(EqualValue equal)
        {
            switch (equal)
            {
            case EqualValue.Source: return("10");

            case EqualValue.Target: return("01");

            case EqualValue.Column: return("11");

            default: return("11");
            }
        }
示例#2
0
        /// <summary>
        /// Convert-back method
        /// </summary>
        /// <param name="value"></param>
        /// <param name="targetType"></param>
        /// <param name="parameter"></param>
        /// <param name="culture"></param>
        /// <returns></returns>
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if ((EqualValue?.Equals(value) ?? value?.Equals(EqualValue)) != false) // Equal, or both null
            {
                return(ConvertBackEqualValue);
            }
            if ((InequalValue?.Equals(value) ?? value?.Equals(InequalValue)) != false)
            {
                return(ConvertBackInequalValue);
            }

            return(null);
        }