Update tests to verify async rendering.

Also changed naming of the CreateBuilder method in the Razor language to CreateCodeBuilder.
This commit is contained in:
N. Taylor Mullen 2014-03-13 16:40:05 -07:00
parent 5912475a24
commit aef8a79081
53 changed files with 163 additions and 111 deletions

View File

@ -98,8 +98,8 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.Tabs, tabTest: TabTest.Tabs,
expectedDesignTimePragmas: new List<LineMapping>() expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(1, 0, 1, 448, 20, 0, 15), BuildLineMapping(1, 0, 1, 494, 21, 0, 15),
BuildLineMapping(27, 2, 12, 539, 28, 6, 3) BuildLineMapping(27, 2, 12, 585, 29, 6, 3)
}); });
} }
@ -109,13 +109,13 @@ namespace Microsoft.AspNet.Razor.Test.Generator
RunTest("RazorComments", "RazorComments.DesignTime", designTimeMode: true, tabTest: TabTest.NoTabs, RunTest("RazorComments", "RazorComments.DesignTime", designTimeMode: true, tabTest: TabTest.NoTabs,
expectedDesignTimePragmas: new List<LineMapping>() expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(81, 3, 441, 20, 2, 6), BuildLineMapping(81, 3, 487, 21, 2, 6),
BuildLineMapping(122, 4, 39, 552, 27, 38, 22), BuildLineMapping(122, 4, 39, 598, 28, 38, 22),
BuildLineMapping(173, 5, 49, 689, 34, 48, 58), BuildLineMapping(173, 5, 49, 735, 35, 48, 58),
BuildLineMapping(238, 11, 815, 43, 2, 24), BuildLineMapping(238, 11, 861, 44, 2, 24),
BuildLineMapping(310, 12, 973, 49, 45, 3), BuildLineMapping(310, 12, 1019, 50, 45, 3),
BuildLineMapping(323, 14, 2, 1070, 54, 6, 1), BuildLineMapping(323, 14, 2, 1116, 55, 6, 1),
BuildLineMapping(328, 14, 1113, 56, 7, 1), BuildLineMapping(328, 14, 1159, 57, 7, 1),
}); });
} }
@ -140,8 +140,8 @@ namespace Microsoft.AspNet.Razor.Test.Generator
BuildLineMapping(1, 0, 1, 51, 3, 0, 15), BuildLineMapping(1, 0, 1, 51, 3, 0, 15),
BuildLineMapping(19, 1, 1, 132, 9, 0, 32), BuildLineMapping(19, 1, 1, 132, 9, 0, 32),
BuildLineMapping(54, 2, 1, 230, 15, 0, 12), BuildLineMapping(54, 2, 1, 230, 15, 0, 12),
BuildLineMapping(99, 4, 716, 37, 29, 21), BuildLineMapping(99, 4, 762, 38, 29, 21),
BuildLineMapping(161, 5, 860, 42, 35, 20), BuildLineMapping(161, 5, 906, 43, 35, 20),
}); });
} }
@ -154,9 +154,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.NoTabs, tabTest: TabTest.NoTabs,
expectedDesignTimePragmas: new List<LineMapping>() expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(12, 0, 12, 156, 8, 0, 4), BuildLineMapping(12, 0, 12, 191, 9, 0, 4),
BuildLineMapping(33, 4, 12, 224, 14, 0, 104), BuildLineMapping(33, 4, 12, 259, 15, 0, 104),
BuildLineMapping(167, 11, 724, 35, 25, 11) BuildLineMapping(167, 11, 770, 36, 25, 11)
}); });
} }
@ -169,9 +169,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.Tabs, tabTest: TabTest.Tabs,
expectedDesignTimePragmas: new List<LineMapping>() expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(12, 0, 12, 156, 8, 0, 4), BuildLineMapping(12, 0, 12, 191, 9, 0, 4),
BuildLineMapping(33, 4, 12, 224, 14, 0, 104), BuildLineMapping(33, 4, 12, 259, 15, 0, 104),
BuildLineMapping(167, 11, 25, 712, 35, 13, 11) BuildLineMapping(167, 11, 25, 758, 36, 13, 11)
}); });
} }
@ -184,7 +184,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.Tabs, tabTest: TabTest.Tabs,
expectedDesignTimePragmas: new List<LineMapping>() expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(16, 2, 12, 170, 8, 0, 55) BuildLineMapping(16, 2, 12, 205, 9, 0, 55)
}); });
} }
@ -193,8 +193,8 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("HiddenSpansInCode", designTimeMode: true, tabTest: TabTest.NoTabs, expectedDesignTimePragmas: new List<LineMapping> RunTest("HiddenSpansInCode", designTimeMode: true, tabTest: TabTest.NoTabs, expectedDesignTimePragmas: new List<LineMapping>
{ {
BuildLineMapping(2, 0, 453, 20, 2, 6), BuildLineMapping(2, 0, 499, 21, 2, 6),
BuildLineMapping(9, 1, 535, 27, 5, 5) BuildLineMapping(9, 1, 581, 28, 5, 5)
}); });
} }
@ -203,7 +203,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("ParserError", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("ParserError", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(2, 0, 435, 20, 2, 31) BuildLineMapping(2, 0, 481, 21, 2, 31)
}); });
} }
@ -218,8 +218,8 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("Inherits", baselineName: "Inherits.Designtime", designTimeMode: true, tabTest: TabTest.NoTabs, expectedDesignTimePragmas: new List<LineMapping>() RunTest("Inherits", baselineName: "Inherits.Designtime", designTimeMode: true, tabTest: TabTest.NoTabs, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(20, 2, 286, 11, 10, 25), BuildLineMapping(20, 2, 321, 12, 10, 25),
BuildLineMapping(1, 0, 1, 605, 25, 6, 5) BuildLineMapping(1, 0, 1, 651, 26, 6, 5)
}); });
} }
@ -228,9 +228,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("UnfinishedExpressionInCode", tabTest: TabTest.NoTabs, designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("UnfinishedExpressionInCode", tabTest: TabTest.NoTabs, designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(2, 0, 480, 20, 2, 2), BuildLineMapping(2, 0, 526, 21, 2, 2),
BuildLineMapping(5, 1, 1, 575, 26, 6, 9), BuildLineMapping(5, 1, 1, 621, 27, 6, 9),
BuildLineMapping(14, 1, 673, 31, 10, 2) BuildLineMapping(14, 1, 719, 32, 10, 2)
}); });
} }
@ -242,9 +242,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.Tabs, tabTest: TabTest.Tabs,
designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(2, 0, 480, 20, 2, 2), BuildLineMapping(2, 0, 526, 21, 2, 2),
BuildLineMapping(5, 1, 1, 575, 26, 6, 9), BuildLineMapping(5, 1, 1, 621, 27, 6, 9),
BuildLineMapping(14, 1, 10, 667, 31, 4, 2) BuildLineMapping(14, 1, 10, 713, 32, 4, 2)
}); });
} }
@ -256,18 +256,18 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.NoTabs, tabTest: TabTest.NoTabs,
expectedDesignTimePragmas: new List<LineMapping>() expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(222, 16, 8, 174, 9, 0, 7), BuildLineMapping(222, 16, 8, 209, 10, 0, 7),
BuildLineMapping(229, 16, 317, 15, 15, 26), BuildLineMapping(229, 16, 352, 16, 15, 26),
BuildLineMapping(265, 18, 426, 23, 18, 9), BuildLineMapping(265, 18, 461, 24, 18, 9),
BuildLineMapping(274, 20, 521, 32, 0, 1), BuildLineMapping(274, 20, 556, 33, 0, 1),
BuildLineMapping(20, 1, 13, 880, 50, 12, 36), BuildLineMapping(20, 1, 13, 926, 51, 12, 36),
BuildLineMapping(74, 2, 1027, 57, 22, 1), BuildLineMapping(74, 2, 1073, 58, 22, 1),
BuildLineMapping(79, 2, 1118, 62, 27, 15), BuildLineMapping(79, 2, 1164, 63, 27, 15),
BuildLineMapping(113, 7, 2, 1228, 69, 6, 12), BuildLineMapping(113, 7, 2, 1274, 70, 6, 12),
BuildLineMapping(129, 8, 1, 1334, 74, 6, 4), BuildLineMapping(129, 8, 1, 1380, 75, 6, 4),
BuildLineMapping(142, 8, 1459, 76, 14, 3), BuildLineMapping(142, 8, 1505, 77, 14, 3),
BuildLineMapping(153, 8, 1556, 83, 25, 1), BuildLineMapping(153, 8, 1602, 84, 25, 1),
BuildLineMapping(204, 13, 5, 1729, 93, 6, 3) BuildLineMapping(204, 13, 5, 1775, 94, 6, 3)
}); });
} }
@ -277,7 +277,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("ImplicitExpressionAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("ImplicitExpressionAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(19, 2, 1, 487, 20, 6, 0) BuildLineMapping(19, 2, 1, 533, 21, 6, 0)
}); });
} }
@ -286,7 +286,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("ExplicitExpressionAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("ExplicitExpressionAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(20, 2, 2, 487, 20, 6, 0) BuildLineMapping(20, 2, 2, 533, 21, 6, 0)
}); });
} }
@ -295,7 +295,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("CodeBlockAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("CodeBlockAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(2, 0, 444, 20, 2, 0) BuildLineMapping(2, 0, 490, 21, 2, 0)
}); });
} }
@ -304,7 +304,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("EmptyImplicitExpression", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("EmptyImplicitExpression", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(19, 2, 1, 487, 20, 6, 0) BuildLineMapping(19, 2, 1, 533, 21, 6, 0)
}); });
} }
@ -313,9 +313,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("EmptyImplicitExpressionInCode", tabTest: TabTest.NoTabs, designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("EmptyImplicitExpressionInCode", tabTest: TabTest.NoTabs, designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(2, 0, 489, 20, 2, 6), BuildLineMapping(2, 0, 535, 21, 2, 6),
BuildLineMapping(9, 1, 5, 590, 27, 6, 0), BuildLineMapping(9, 1, 5, 636, 28, 6, 0),
BuildLineMapping(9, 1, 677, 32, 5, 2) BuildLineMapping(9, 1, 723, 33, 5, 2)
}); });
} }
@ -327,9 +327,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.Tabs, tabTest: TabTest.Tabs,
designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(2, 0, 489, 20, 2, 6), BuildLineMapping(2, 0, 535, 21, 2, 6),
BuildLineMapping(9, 1, 5, 590, 27, 6, 0), BuildLineMapping(9, 1, 5, 636, 28, 6, 0),
BuildLineMapping(9, 1, 5, 674, 32, 2, 2) BuildLineMapping(9, 1, 5, 720, 33, 2, 2)
}); });
} }
@ -338,7 +338,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("EmptyExplicitExpression", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("EmptyExplicitExpression", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(20, 2, 2, 487, 20, 6, 0) BuildLineMapping(20, 2, 2, 533, 21, 6, 0)
}); });
} }
@ -347,7 +347,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{ {
RunTest("EmptyCodeBlock", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>() RunTest("EmptyCodeBlock", designTimeMode: true, expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(20, 2, 444, 20, 2, 0) BuildLineMapping(20, 2, 490, 21, 2, 0)
}); });
} }
@ -412,10 +412,10 @@ namespace Microsoft.AspNet.Razor.Test.Generator
}, },
expectedDesignTimePragmas: new List<LineMapping>() expectedDesignTimePragmas: new List<LineMapping>()
{ {
BuildLineMapping(17, 2, 1, 424, 20, 0, 14), BuildLineMapping(17, 2, 1, 470, 21, 0, 14),
BuildLineMapping(38, 3, 7, 498 + tabOffsetForMapping, 26, tabOffsetForMapping, 2), BuildLineMapping(38, 3, 7, 544 + tabOffsetForMapping, 27, tabOffsetForMapping, 2),
// Multiply the tab offset absolute index by 2 to account for the first mapping // Multiply the tab offset absolute index by 2 to account for the first mapping
BuildLineMapping(47, 4, 7, 560 + tabOffsetForMapping * 2, 32, tabOffsetForMapping, 0) BuildLineMapping(47, 4, 7, 606 + tabOffsetForMapping * 2, 33, tabOffsetForMapping, 0)
}); });
} }

View File

@ -14,14 +14,14 @@ namespace Microsoft.AspNet.Razor.Test.Generator.CodeTree
{ {
var syntaxTreeNode = new Mock<Span>(new SpanBuilder()); var syntaxTreeNode = new Mock<Span>(new SpanBuilder());
var language = new CSharpRazorCodeLanguage(); var language = new CSharpRazorCodeLanguage();
RazorEngineHost host = new RazorEngineHost(language); var host = new RazorEngineHost(language);
var context = CodeGeneratorContext.Create(host, "TestClass", "TestNamespace", "Foo.cs", shouldGenerateLinePragmas: false); var context = CodeGeneratorContext.Create(host, "TestClass", "TestNamespace", "Foo.cs", shouldGenerateLinePragmas: false);
context.CodeTreeBuilder.AddUsingChunk("FakeNamespace1", syntaxTreeNode.Object); context.CodeTreeBuilder.AddUsingChunk("FakeNamespace1", syntaxTreeNode.Object);
context.CodeTreeBuilder.AddUsingChunk("FakeNamespace2.SubNamespace", syntaxTreeNode.Object); context.CodeTreeBuilder.AddUsingChunk("FakeNamespace2.SubNamespace", syntaxTreeNode.Object);
CodeBuilder codeBuilder = language.CreateCodeBuilder(context); var codeBuilder = language.CreateCodeBuilder(context);
// Act // Act
CodeBuilderResult result = codeBuilder.Build(); var result = codeBuilder.Build();
// Assert // Assert
Assert.Equal(@"namespace TestNamespace Assert.Equal(@"namespace TestNamespace
{ {
@ -37,6 +37,7 @@ using FakeNamespace2.SubNamespace
#line default #line default
#line hidden #line hidden
; ;
using System.Threading.Tasks;
public class TestClass public class TestClass
{ {
@ -45,7 +46,7 @@ using FakeNamespace2.SubNamespace
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
} }
} }

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class Blocks public class Blocks
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "Blocks.cshtml" #line 1 "Blocks.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class CodeBlock public class CodeBlock
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "CodeBlock.cshtml" #line 1 "CodeBlock.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class CodeBlockAtEOF public class CodeBlockAtEOF
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "CodeBlockAtEOF.cshtml" #line 1 "CodeBlockAtEOF.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class CodeTree public class CodeTree
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
} }
} }

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class ConditionalAttributes public class ConditionalAttributes
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "ConditionalAttributes.cshtml" #line 1 "ConditionalAttributes.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class DesignTime public class DesignTime
{ {
@ -45,7 +46,7 @@ Foo() {
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 2 "DesignTime.cshtml" #line 2 "DesignTime.cshtml"
for(int i = 1; i <= 10; i++) { for(int i = 1; i <= 10; i++) {

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class EmptyCodeBlock public class EmptyCodeBlock
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 3 "EmptyCodeBlock.cshtml" #line 3 "EmptyCodeBlock.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class EmptyExplicitExpression public class EmptyExplicitExpression
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "------------------------------------------" #line 1 "------------------------------------------"
__o = ; __o = ;

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class EmptyImplicitExpression public class EmptyImplicitExpression
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "------------------------------------------" #line 1 "------------------------------------------"
__o = ; __o = ;

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class EmptyImplicitExpressionInCode public class EmptyImplicitExpressionInCode
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "EmptyImplicitExpressionInCode.cshtml" #line 1 "EmptyImplicitExpressionInCode.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class EmptyImplicitExpressionInCode public class EmptyImplicitExpressionInCode
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "EmptyImplicitExpressionInCode.cshtml" #line 1 "EmptyImplicitExpressionInCode.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class ExplicitExpression public class ExplicitExpression
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("1 + 1 = "); WriteLiteral("1 + 1 = ");
Write( Write(

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class ExplicitExpressionAtEOF public class ExplicitExpressionAtEOF
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "------------------------------------------" #line 1 "------------------------------------------"
__o = ; __o = ;

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class ExpressionsInCode public class ExpressionsInCode
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "ExpressionsInCode.cshtml" #line 1 "ExpressionsInCode.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class FunctionsBlock public class FunctionsBlock
{ {
@ -30,7 +31,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "------------------------------------------" #line 1 "------------------------------------------"
__o = RandomInt(); __o = RandomInt();

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class FunctionsBlock public class FunctionsBlock
{ {
@ -30,7 +31,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "------------------------------------------" #line 1 "------------------------------------------"
__o = RandomInt(); __o = RandomInt();

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class FunctionsBlock public class FunctionsBlock
{ {
@ -24,7 +25,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
WriteLiteral("\r\nHere\'s a random number: "); WriteLiteral("\r\nHere\'s a random number: ");

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class FunctionsBlockMinimal public class FunctionsBlockMinimal
{ {
@ -23,7 +24,7 @@ string foo(string input) {
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
} }
} }

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class FunctionsBlock_Tabs public class FunctionsBlock_Tabs
{ {
@ -24,7 +25,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
WriteLiteral("\r\nHere\'s a random number: "); WriteLiteral("\r\nHere\'s a random number: ");

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class Helpers public class Helpers
{ {
@ -83,7 +84,7 @@ Italic(string s) {
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
WriteLiteral("\r\n"); WriteLiteral("\r\n");

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class Helpers public class Helpers
{ {
@ -83,7 +84,7 @@ Italic(string s) {
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
WriteLiteral("\r\n"); WriteLiteral("\r\n");

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class HelpersMissingCloseParen public class HelpersMissingCloseParen
{ {
@ -54,7 +55,7 @@ Italic(string s
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
} }

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class HelpersMissingOpenBrace public class HelpersMissingOpenBrace
{ {
@ -53,7 +54,7 @@ Italic(string s)
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
Write( Write(

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class HelpersMissingOpenParen public class HelpersMissingOpenParen
{ {
@ -53,7 +54,7 @@ Italic
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
Write( Write(

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class HiddenSpansInCode public class HiddenSpansInCode
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "HiddenSpansInCode.cshtml" #line 1 "HiddenSpansInCode.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class HtmlCommentWithQuote_Double public class HtmlCommentWithQuote_Double
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("<!-- \" -->\r\n<img"); WriteLiteral("<!-- \" -->\r\n<img");
WriteAttribute("src", Tuple.Create(" src=\"", 16), Tuple.Create("\"", 41), Tuple.Create(Tuple.Create("", 22), Tuple.Create<System.Object, System.Int32>(Href("~/images/submit.png"), 22), false)); WriteAttribute("src", Tuple.Create(" src=\"", 16), Tuple.Create("\"", 41), Tuple.Create(Tuple.Create("", 22), Tuple.Create<System.Object, System.Int32>(Href("~/images/submit.png"), 22), false));

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class HtmlCommentWithQuote_Single public class HtmlCommentWithQuote_Single
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("<!-- \' -->\r\n<img"); WriteLiteral("<!-- \' -->\r\n<img");
WriteAttribute("src", Tuple.Create(" src=\"", 16), Tuple.Create("\"", 41), Tuple.Create(Tuple.Create("", 22), Tuple.Create<System.Object, System.Int32>(Href("~/images/submit.png"), 22), false)); WriteAttribute("src", Tuple.Create(" src=\"", 16), Tuple.Create("\"", 41), Tuple.Create(Tuple.Create("", 22), Tuple.Create<System.Object, System.Int32>(Href("~/images/submit.png"), 22), false));

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class ImplicitExpression public class ImplicitExpression
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "ImplicitExpression.cshtml" #line 1 "ImplicitExpression.cshtml"
for(int i = 1; i <= 10; i++) { for(int i = 1; i <= 10; i++) {

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class ImplicitExpressionAtEOF public class ImplicitExpressionAtEOF
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "------------------------------------------" #line 1 "------------------------------------------"
__o = ; __o = ;

View File

@ -18,6 +18,7 @@ using System
#line default #line default
#line hidden #line hidden
; ;
using System.Threading.Tasks;
public class Imports public class Imports
{ {
@ -32,7 +33,7 @@ using System
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "------------------------------------------" #line 1 "------------------------------------------"
__o = typeof(Path).FullName; __o = typeof(Path).FullName;

View File

@ -18,6 +18,7 @@ using System
#line default #line default
#line hidden #line hidden
; ;
using System.Threading.Tasks;
public class Imports public class Imports
{ {
@ -26,7 +27,7 @@ using System
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n<p>Path\'s full type name is "); WriteLiteral("\r\n<p>Path\'s full type name is ");
Write( Write(

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class Inherits : foo.bar<baz<biz>>.boz bar public class Inherits : foo.bar<baz<biz>>.boz bar
{ {
@ -20,7 +21,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "------------------------------------------" #line 1 "------------------------------------------"
__o = foo(); __o = foo();

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class Inherits : foo.bar<baz<biz>>.boz bar public class Inherits : foo.bar<baz<biz>>.boz bar
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
Write( Write(
#line 1 "Inherits.cshtml" #line 1 "Inherits.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class InlineBlocks public class InlineBlocks
{ {
@ -68,7 +69,7 @@ Link(string link) {
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
} }
} }

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class LayoutDirective public class LayoutDirective
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
Layout = "~/Foo/Bar/Baz"; Layout = "~/Foo/Bar/Baz";
} }

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class MarkupInCodeBlock public class MarkupInCodeBlock
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "MarkupInCodeBlock.cshtml" #line 1 "MarkupInCodeBlock.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class NestedCodeBlocks public class NestedCodeBlocks
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "NestedCodeBlocks.cshtml" #line 1 "NestedCodeBlocks.cshtml"
if(foo) { if(foo) {

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class NestedHelpers public class NestedHelpers
{ {
@ -91,7 +92,7 @@ Bold(string s) {
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
Write( Write(

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class NoLinePragmas public class NoLinePragmas
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "" #line 1 ""

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class OpenedIf public class OpenedIf
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 3 "OpenedIf.cshtml" #line 3 "OpenedIf.cshtml"
if (true) { if (true) {

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class OpenedIf public class OpenedIf
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 3 "OpenedIf.cshtml" #line 3 "OpenedIf.cshtml"
if (true) { if (true) {

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class ParserError public class ParserError
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "ParserError.cshtml" #line 1 "ParserError.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class RazorComments public class RazorComments
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 4 "RazorComments.cshtml" #line 4 "RazorComments.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class RazorComments public class RazorComments
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n<p>This should be shown</p>\r\n\r\n"); WriteLiteral("\r\n<p>This should be shown</p>\r\n\r\n");
#line 4 "RazorComments.cshtml" #line 4 "RazorComments.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class ResolveUrl public class ResolveUrl
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("<a"); WriteLiteral("<a");
WriteAttribute("href", Tuple.Create(" href=\"", 2), Tuple.Create("\"", 14), Tuple.Create(Tuple.Create("", 9), Tuple.Create<System.Object, System.Int32>(Href("~/Foo"), 9), false)); WriteAttribute("href", Tuple.Create(" href=\"", 2), Tuple.Create("\"", 14), Tuple.Create(Tuple.Create("", 9), Tuple.Create<System.Object, System.Int32>(Href("~/Foo"), 9), false));

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class Sections public class Sections
{ {
@ -9,7 +10,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "Sections.cshtml" #line 1 "Sections.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class SimpleUnspacedIf public class SimpleUnspacedIf
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "SimpleUnspacedIf.cshtml" #line 1 "SimpleUnspacedIf.cshtml"
if (true) if (true)

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class Templates public class Templates
{ {
@ -21,7 +22,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
WriteLiteral("\r\n"); WriteLiteral("\r\n");
#line 11 "Templates.cshtml" #line 11 "Templates.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class UnfinishedExpressionInCode public class UnfinishedExpressionInCode
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "UnfinishedExpressionInCode.cshtml" #line 1 "UnfinishedExpressionInCode.cshtml"

View File

@ -1,6 +1,7 @@
namespace TestOutput namespace TestOutput
{ {
using System; using System;
using System.Threading.Tasks;
public class UnfinishedExpressionInCode public class UnfinishedExpressionInCode
{ {
@ -15,7 +16,7 @@ namespace TestOutput
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "UnfinishedExpressionInCode.cshtml" #line 1 "UnfinishedExpressionInCode.cshtml"

View File

@ -1,5 +1,6 @@
namespace Razor namespace Razor
{ {
using System.Threading.Tasks;
public class __CompiledTemplate public class __CompiledTemplate
{ {
@ -14,7 +15,7 @@
{ {
} }
public override void Execute() public override async Task ExecuteAsync()
{ {
#line 1 "C:\This\Path\Is\Just\For\Line\Pragmas.cshtml" #line 1 "C:\This\Path\Is\Just\For\Line\Pragmas.cshtml"