Exemplo n.º 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);
        }
Exemplo n.º 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));
        }