/// <summary> /// If "seq" is non-null, then clear it and reuse it. Otherwise, create a new XmlQueryNodeSequence. /// </summary> public static XmlQueryNodeSequence CreateOrReuse(XmlQueryNodeSequence seq) { if (seq != null) { seq.Clear(); return(seq); } return(new XmlQueryNodeSequence()); }
/// <summary> /// If "seq" is non-null, then clear it and reuse it. Otherwise, create a new XmlQueryNodeSequence. /// Add "nav" to the sequence. /// </summary> public static XmlQueryNodeSequence CreateOrReuse(XmlQueryNodeSequence seq, XPathNavigator navigator) { if (seq != null) { seq.Clear(); seq.Add(navigator); return(seq); } return(new XmlQueryNodeSequence(navigator)); }