public bool Contains(CodeRange range) { if (range == null) { return(false); } CatalogCode counter = range.fromCode; while (counter.Youngest() <= range.toCode.Youngest()) { if (Get(counter) != null) { return(true); } counter = counter.Increment(); } return(false); }
public bool Contains(CodeRange range, CodeRange usingCodeRange, int offset) { if (range == null) { return(false); } CatalogCode counter1 = range.fromCode; CatalogCode counter2 = usingCodeRange.fromCode + offset; while (counter1.Youngest() <= range.toCode.Youngest()) { if (Contains(counter2) && Contains(counter1)) { return(true); } counter1 = counter1.Increment(); counter2 = counter2.Increment(); } return(false); }