Skip to content

Commit 3ff8640

Browse files
committed
added compiler oprions
1 parent 770f374 commit 3ff8640

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using System.CodeDom.Compiler;
3+
using System.Collections.Generic;
4+
using System.Reflection;
5+
using Microsoft.CSharp;
6+
using MossbauerLab.TinyTcpServer.Core.Server;
7+
8+
namespace MossbauerLab.TinyTcpServer.Core.Scripting
9+
{
10+
public class CompilerOptions
11+
{
12+
public CompilerOptions()
13+
{
14+
Provider = new CSharpCodeProvider(new Dictionary<String, String>()
15+
{
16+
{"CompilerVersion", "v4.0"}
17+
});
18+
19+
Parameters = new CompilerParameters(new[]
20+
{
21+
Assembly.GetAssembly(typeof(TcpServer)).Location
22+
});
23+
24+
ScriptEntryType = DefaultScriptEntryType;
25+
}
26+
27+
public CompilerOptions(CSharpCodeProvider provider, CompilerParameters parameters,
28+
String scriptEntryType = DefaultScriptEntryType)
29+
{
30+
Provider = provider;
31+
Parameters = parameters;
32+
ScriptEntryType = scriptEntryType;
33+
}
34+
35+
public String ScriptEntryType { get; set; }
36+
public CSharpCodeProvider Provider { get; set; }
37+
public CompilerParameters Parameters { get; set; }
38+
39+
private const String DefaultScriptEntryType = "MossbauerLab.Flexibility.ServerScript";
40+
}
41+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy