// Set default references private void resetReferences() { Compiler = new CSharpCompiler(this); Compiler.AddHeaders("using System;using System.Collections.Generic;using System.Collections;using System.Text;using System.IO;using System.Text.RegularExpressions;using System.Xml;using System.Globalization;"); Compiler.AddHeaders("using XS=" + typeof(CSharpCompiler).Namespace + ";"); foreach (string type in "System.dll;System.Xml.dll;System.Data.dll".Split(';')) { Compiler.AddReference(type, null, false, false, null); } Compiler.AddReference("System.Configuration.dll", null, false, false, "System.Configuration."); Compiler.AddReference("System.ServiceProcess.dll", null, false, false, "System.ServiceProcess."); Compiler.AddReference(null, typeof(ScriptContext).Assembly.FullName, true, false, null); }
public SharpCodeGenerator(CSharpCompiler compiler) { Compiler = compiler; }
public Generator(CSharpCompiler re, TextWriter codeWriter, TextWriter snippetWriter, GeneratorOptions options) { _re = re; MainCode = codeWriter; SnippetsCode = snippetWriter; _options = options; }