summaryrefslogtreecommitdiff
path: root/CommandLineWrapperExample/Program.cs
blob: 6c0e587d4bedd7b8524b11e7ce62ac6a994ead30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using CommandLineWrapper;

namespace CommandLineWrapperExample;

internal abstract class Program
{
    private static string currentDirectory = "/.Temp/Current/";
    private static string CorrectCurrentDirectory()
    {
        var current = Directory.GetCurrentDirectory() + currentDirectory;
        if (!Directory.Exists(current))
            Directory.CreateDirectory(current);
        Directory.SetCurrentDirectory(current);
        return current;
    }

    private static async Task Main(string[] args)
    {
        var current = CorrectCurrentDirectory();

        // Use Current as the workspace directory
        var workspace = new JVCSWorkspace();
        await workspace.InitializeAsync(current);
    }
}