File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
TinyTcpServer/MossbauerLab.TinyTcpServer.Core/Scripting Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments