protected override void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent) { NumberMatcher backingMatcher = (NumberMatcher)matcher; backingMatcher.ignoredPrefix = parent.Prefix; backingMatcher.ignoredSuffix = parent.Suffix; if (DecimalSeparator != "") { backingMatcher.decimalSeparator = DecimalSeparator[0]; } else { backingMatcher.decimalSeparator = null; } if (GroupSeparator != "") { backingMatcher.groupSeparator = GroupSeparator[0]; } else { backingMatcher.groupSeparator = null; } }
protected override void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent) { TextConfigurableMatcher backingMatcher = (TextConfigurableMatcher)matcher; backingMatcher.ignoredPrefix = parent.Prefix; backingMatcher.ignoredSuffix = parent.Suffix; backingMatcher.Separator = parent.Separator; }
protected override void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent) { DateTimeFormatMatcher backingMatcher = (DateTimeFormatMatcher)matcher; backingMatcher.Format = DateTimeFormat; backingMatcher.ignoredPrefix = parent.Prefix; backingMatcher.ignoredSuffix = parent.Suffix; backingMatcher.Separator = parent.Separator; }
public void propagateToBackingMatchers(MyBindingList <IMatcher <IComparable> > matchers, GeneralMatcherVM parent) { Console.WriteLine("At matcher"); if (backingMatcher == null) { // if new matcher was removed before being applied if (removed) { return; } // if matcher is new backingMatcher = createBackingMatcher(); updateBackingMatcher(backingMatcher, parent); matchers.Add(backingMatcher); } else { if (removed) { // if existing matcher is removed matchers.Remove(backingMatcher); } else { // if existing matcher was changed updateBackingMatcher(backingMatcher, parent); } } }
protected abstract void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent);
protected override void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent) { InlineRegexMatcher backingMatcher = (InlineRegexMatcher)matcher; backingMatcher.Pattern = Pattern; }