override fun runMergeTask()

in plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/dotnet/coverage/dotcover/DotCover1_0_ReporterImpl.kt [73:106]


    override fun runMergeTask(reportFiles: Collection<File>): File {
        val reportFile: File = _tempFactory.createTempFile(
            _coverageParameters.getTempDirectory(),
            "dotCoverSnapshot",
            ".dcvr",
            100)

        val doc: Document = object : Document() {
            init {
                addContent(object : Element("MergeParams") {
                    init {
                        addContent(object : Element("Source") {
                            init {
                                for (file in reportFiles) {
                                    addContent(object : Element("string") {
                                        init { text = file.path }
                                    } as Content)
                                }
                            }
                        } as Content)
                        addContent(object : Element("TempDir") {
                            init { text = _coverageParameters.getTempDirectory().path }
                        } as Content)
                        addContent(object : Element("Output") {
                            init { text = reportFile.path }
                        } as Content)
                    }
                })
            }
        }

        _runner.runDotCoverTool("Merge dotCover reports", emptyList(), "merge", doc)
        return reportFile
    }