class WorkerManager implements ApplicationListener, EndExecutionCallback, WorkerRecoveryListener {

    protected static String resolveDotNetVersion() {
        File dotNetHome = new File(DOTNET_PATH);
        if (dotNetHome.isDirectory()) {
            File[] versionFolders = dotNetHome.listFiles(new FileFilter() {

                @Override
                public boolean accept(File file) {
                    return file.isDirectory() && file.getName().startsWith("v");
                }
            });
            if (!ArrayUtils.isEmpty(versionFolders)) {
                String maxVersion = max(versionFolders, on(File.class).getName()).substring(1);
                return maxVersion.substring(0, 1) + ".x";
            }
        }
        return "N/A";
    }

}