public bool TryAdd(IAutoFillSectionEntry entry) { if (entries.First().IsSequenceOf(entry)) { entries.Add(entry); return(true); } return(false); }
public bool IsSequenceOf(IAutoFillSectionEntry otherEntry) { var otherTextEntry = otherEntry as TextAutoFillSectionEntry; if (otherTextEntry == null) { return(false); } return(textLeftOfDigit.Equals(otherTextEntry.textLeftOfDigit) && textRightOfDigit.Equals(otherTextEntry.textRightOfDigit) && hasDigit == otherTextEntry.hasDigit); }
public AutoFillSection(IAutoFillSectionEntry entry) { entries.Add(entry); }
public bool IsSequenceOf(IAutoFillSectionEntry otherEntry) { return(otherEntry is NullAutoFillSectionEntry); }