Changeset 218

Show
Ignore:
Timestamp:
10/22/08 07:26:23 (3 months ago)
Author:
louis.dejardin
Message:

Starting to add a CodeDomViewCompiler? version of the ViewCompiler?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/Spark.Tests/Spark.Tests.csproj

    r208 r218  
    5555  </ItemGroup> 
    5656  <ItemGroup> 
     57    <Compile Include="CodeDomViewCompilerTester.cs" /> 
    5758    <Compile Include="Compiler\ExpressionBuilderTester.cs" /> 
    5859    <Compile Include="Compiler\ForEachInspectorTester.cs" /> 
  • trunk/src/Spark/Compiler/BatchCompiler.cs

    r187 r218  
    3232            var providerOptions = new Dictionary<string, string> { { "CompilerVersion", "v3.5" } }; 
    3333 
    34             var codeProvider = new CSharpCodeProvider(providerOptions); 
     34            return Compile(new CSharpCodeProvider(providerOptions), debug, sourceCode); 
     35        } 
     36 
     37        public Assembly Compile(CodeDomProvider codeProvider, bool debug, params string[] sourceCode) 
     38        { 
    3539 
    3640            var compilerParameters = new CompilerParameters(); 
  • trunk/src/Spark/Compiler/CSharp/DefaultViewCompiler.cs

    r208 r218  
    122122            } 
    123123 
    124             // public void RenderView(
     124            // public void RenderView(TextWriter writer
    125125            source.AppendLine(); 
    126126            source.AppendLine("    public override void RenderView(System.IO.TextWriter writer)"); 
  • trunk/src/Spark/Spark.csproj

    r208 r218  
    5959    <Compile Include="Compiler\Chunk.cs" /> 
    6060    <Compile Include="Compiler\ChunkVisitors\AbstractChunkVisitor.cs" /> 
     61    <Compile Include="Compiler\CodeDom\ChunkVisitors\GeneratedCodeVisitor.cs" /> 
     62    <Compile Include="Compiler\CodeDom\ChunkVisitors\UsingNamespaceVisitor.cs" /> 
     63    <Compile Include="Compiler\CodeDom\CodeDomViewCompiler.cs" /> 
    6164    <Compile Include="Compiler\ExpressionBuilder.cs" /> 
    6265    <Compile Include="Compiler\CSharp\ChunkVisitors\BaseClassVisitor.cs" /> 
  • trunk/src/Spark/SparkViewDescriptor.cs

    r187 r218  
    2020    { 
    2121        CSharp, 
    22         Javascript 
     22        Javascript, 
     23        VisualBasic 
    2324    } 
    2425 
  • trunk/src/Spark/SparkViewEngine.cs

    r214 r218  
    2121using System.Web.Hosting; 
    2222using Spark.Compiler; 
     23using Spark.Compiler.CodeDom; 
    2324using Spark.Compiler.CSharp; 
    2425using Spark.Compiler.Javascript; 
     
    233234                case LanguageType.Javascript: 
    234235                    viewCompiler = new JavascriptViewCompiler(); 
     236                    break; 
     237                case LanguageType.VisualBasic: 
     238                    viewCompiler = new CodeDomViewCompiler("vb"); 
    235239                    break; 
    236240                default: