示例#1
0
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (!(parameter is InspectionResultsFilter flag) ||
                !(value is bool isSet))
            {
                return(_state);
            }

            _state ^= flag;
            return(_state);
        }
示例#2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (!(parameter is InspectionResultsFilter flag) ||
                !(value is InspectionResultsFilter bound))
            {
                return(_state);
            }

            _state = bound;
            return(_state.HasFlag(flag));
        }