public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { this.target ^= (PurityLevel)parameter; return this.target; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { PurityLevel mask = (PurityLevel)parameter; this.target = (PurityLevel)value; return ((mask & this.target) != 0); }
public PureAttribute(PurityLevel pl) { this.Value = true; purityLevel = pl | PurityLevel.Weak; }
public PureAttribute(bool value) { this.Value = value; purityLevel = PurityLevel.Normal | PurityLevel.Weak; }
public PureAttribute() { this.Value = true; purityLevel = PurityLevel.Normal | PurityLevel.Weak; }
string PurityToSearchString(PurityLevel purity) { return Convert.ToString((int)purity, 2).PadLeft(3, '0'); }