/// <summary> /// Gets the Xml string representation of the ITestFilter instance. /// </summary> /// <param name="filter">The test filter to get the Xml string of.</param> /// <param name="withOuterTags">If to add the outer filter tags to the xml string.</param> /// <returns>The Xml string representation of the ITestFilter instance.</returns> private static string GetXmlString(ITestFilter filter, bool withOuterTags = true) { string outerXml = filter.ToXml(true).OuterXml; return(withOuterTags ? $"<filter>{outerXml}</filter>" : outerXml); }