override fun getParameters()

in plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/mono/MonoPropertiesExtension.kt [22:48]


    override fun getParameters(): MutableMap<String, String> {
        LOG.debug("Locating Mono")
        try {
            val command = CommandLine(
                    null,
                    TargetType.Tool,
                    Path(_toolProvider.getPath(MonoConstants.RUNNER_TYPE)),
                    Path("."),
                    listOf(CommandLineArgument("--version", CommandLineArgumentType.Mandatory)),
                    emptyList())
            _commandLineExecutor.tryExecute(command)?.let {
                val version = _versionParser.parse(it.standardOutput)
                if (!version.isEmpty()) {
                    LOG.info("Found Mono $it at ${command.executableFile.path}")
                    return mutableMapOf(Pair(MonoConstants.CONFIG_PATH, command.executableFile.path))
                }
                else {
                    LOG.info("Mono not found")
                }
            }
        } catch (e: ToolCannotBeFoundException) {
            LOG.info("Mono not found")
            LOG.debug(e)
        }

        return mutableMapOf()
    }