Skip to content

Commit 2142e69

Browse files
committed
Add c# environment
1 parent 8089522 commit 2142e69

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

lib/environment/preset.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,20 @@ var Environments = map[string]*Environment{
135135
BuildCmdOnDocker: "gcc -std=gnu11 -O2 -o a.out main.c -lm",
136136
CmdOnDocker: "./a.out",
137137
},
138+
"c#": {
139+
Key: "c#",
140+
Language: "C# (Mono 4.6.2.0)",
141+
SrcName: "Main.cs",
142+
Template: "internal/cs/Main.cs",
143+
LanguageCode: "3006",
144+
145+
BuildCmd: "mcs -warn:0 -o+ -r:System.Numerics Main.cs",
146+
Cmd: "mono Main.exe",
147+
CleanCmd: "rm -rf Main.exe",
148+
149+
DockerImage: "docker.io/library/mono:4.6.2",
150+
BuildCmdOnDocker: "mcs -warn:0 -o+ -r:System.Numerics Main.cs",
151+
CmdOnDocker: "mono Main.exe",
152+
},
138153
}
139154

statik/statik.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/cs/Main.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Code for {{.Task.Name}}
2+
using System;
3+
4+
class Program {
5+
static void Main(string[] args) {
6+
System.Console.WriteLine("Hello world");
7+
}
8+
}

0 commit comments

Comments
 (0)