private byte[] RewriteXapWithSpecialFiles(byte[] xapHost, Func<IEnumerable<ITestFile>> filesToCopyIntoHostXapFunc, string runtimeVersion) { var files = filesToCopyIntoHostXapFunc(); if (files.Any()) { var rewriter = new XapRewriter(_logger); xapHost = rewriter .RewriteZipHostWithFiles(xapHost, files, runtimeVersion) .ToByteArray(); } return xapHost; }