private static CompilerResults Compile(string dieselSource)
        {
            var csharpSource   = DieselCompiler.Compile(dieselSource);
            var csharpCompiler = DieselCompiler.GetCSharpProvider();
            var parameters     = new CompilerParameters()
            {
                GenerateExecutable      = false,
                GenerateInMemory        = true,
                IncludeDebugInformation = false,
                ReferencedAssemblies    = { "System.Runtime.Serialization.dll" }
            };
            var result = csharpCompiler.CompileAssemblyFromSource(parameters, csharpSource);

            Assert.That(result.Errors, Is.Empty);
            return(result);
        }
Esempio n. 2
0
 private static string CompileToSource(CodeCompileUnit codeCompileUnit)
 {
     return(DieselCompiler.CompileToSource(codeCompileUnit, DieselCompiler.GetCSharpProvider()));
 }