public static bool IsAnyTextType(this Part part) { var contentType = part?.ContentType; return(ContentTypes.IsXmlType(contentType) || ContentTypes.IsCodeType(contentType) || ContentTypes.IsTextType(contentType)); }