< Summary

Information
Class: SwitchBlade.Core.InverseBooleanConverter
Assembly: SwitchBlade
File(s): D:\a\switchblade\switchblade\Core\InverseBooleanConverter.cs
Tag: 203_23722840422
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 27
Line coverage: 100%
Branch coverage
100%
Covered branches: 8
Total branches: 8
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Convert(...)100%44100%
ConvertBack(...)100%44100%

File(s)

D:\a\switchblade\switchblade\Core\InverseBooleanConverter.cs

#LineLine coverage
 1using System;
 2using System.Globalization;
 3using System.Windows.Data;
 4
 5namespace SwitchBlade.Core
 6{
 7    public class InverseBooleanConverter : IValueConverter
 8    {
 9        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 310        {
 311            if (value is bool boolValue)
 212            {
 213                return !boolValue;
 14            }
 115            return value;
 316        }
 17
 18        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 319        {
 320            if (value is bool boolValue)
 221            {
 222                return !boolValue;
 23            }
 124            return value;
 325        }
 26    }
 27}