[Fixes #169] Await TagHelper generated objects

This commit is contained in:
Ajay Bhargav Baaskaran 2015-03-17 15:31:27 -07:00
parent 4345b06e88
commit 7b468344c0
9 changed files with 69 additions and 68 deletions

View File

@ -361,6 +361,8 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp
private void RenderWriteTagHelperMethodCall() private void RenderWriteTagHelperMethodCall()
{ {
_writer.Write("await ");
if (!string.IsNullOrEmpty(_context.TargetWriterName)) if (!string.IsNullOrEmpty(_context.TargetWriterName))
{ {
_writer _writer
@ -375,8 +377,7 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp
_writer _writer
.Write(ExecutionContextVariableName) .Write(ExecutionContextVariableName)
.WriteEndMethodInvocation(endLine: false) .WriteEndMethodInvocation();
.WriteLine(".Wait();");
} }
private void RenderRunTagHelpers() private void RenderRunTagHelpers()
@ -384,12 +385,12 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp
_writer.Write(ExecutionContextVariableName) _writer.Write(ExecutionContextVariableName)
.Write(".") .Write(".")
.WriteStartAssignment(_tagHelperContext.ExecutionContextOutputPropertyName) .WriteStartAssignment(_tagHelperContext.ExecutionContextOutputPropertyName)
.Write("await ")
.WriteStartInstanceMethodInvocation(RunnerVariableName, .WriteStartInstanceMethodInvocation(RunnerVariableName,
_tagHelperContext.RunnerRunAsyncMethodName); _tagHelperContext.RunnerRunAsyncMethodName);
_writer.Write(ExecutionContextVariableName) _writer.Write(ExecutionContextVariableName)
.WriteEndMethodInvocation(endLine: false) .WriteEndMethodInvocation();
.WriteLine(".Result;");
} }
private void RenderBufferedAttributeValue(TagHelperAttributeDescriptor attributeDescriptor) private void RenderBufferedAttributeValue(TagHelperAttributeDescriptor attributeDescriptor)

View File

@ -35,8 +35,8 @@ namespace TestOutput
, StartTagHelperWritingScope, EndTagHelperWritingScope); , StartTagHelperWritingScope, EndTagHelperWritingScope);
__PTagHelper = CreateTagHelper<PTagHelper>(); __PTagHelper = CreateTagHelper<PTagHelper>();
__tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Add(__PTagHelper);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => {
@ -49,8 +49,8 @@ namespace TestOutput
__InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>();
__tagHelperExecutionContext.Add(__InputTagHelper2); __tagHelperExecutionContext.Add(__InputTagHelper2);
__InputTagHelper2.Type = __InputTagHelper.Type; __InputTagHelper2.Type = __InputTagHelper.Type;
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => {
@ -69,8 +69,8 @@ namespace TestOutput
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -78,8 +78,8 @@ namespace TestOutput
__PTagHelper = CreateTagHelper<PTagHelper>(); __PTagHelper = CreateTagHelper<PTagHelper>();
__tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Add(__PTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute("class", "Hello World"); __tagHelperExecutionContext.AddHtmlAttribute("class", "Hello World");
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(212, 8, true); Instrumentation.BeginContext(212, 8, true);
WriteLiteral("\r\n</div>"); WriteLiteral("\r\n</div>");

View File

@ -47,8 +47,8 @@ namespace TestOutput
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -56,8 +56,8 @@ namespace TestOutput
__PTagHelper = CreateTagHelper<PTagHelper>(); __PTagHelper = CreateTagHelper<PTagHelper>();
__tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Add(__PTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute("class", "Hello World"); __tagHelperExecutionContext.AddHtmlAttribute("class", "Hello World");
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(249, 11, true); Instrumentation.BeginContext(249, 11, true);
WriteLiteral("\r\n</THSdiv>"); WriteLiteral("\r\n</THSdiv>");

View File

@ -36,8 +36,8 @@ namespace TestOutput
, StartTagHelperWritingScope, EndTagHelperWritingScope); , StartTagHelperWritingScope, EndTagHelperWritingScope);
__PTagHelper = CreateTagHelper<PTagHelper>(); __PTagHelper = CreateTagHelper<PTagHelper>();
__tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Add(__PTagHelper);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => {
@ -50,8 +50,8 @@ namespace TestOutput
__InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>();
__tagHelperExecutionContext.Add(__InputTagHelper2); __tagHelperExecutionContext.Add(__InputTagHelper2);
__InputTagHelper2.Type = __InputTagHelper.Type; __InputTagHelper2.Type = __InputTagHelper.Type;
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => {
@ -70,8 +70,8 @@ namespace TestOutput
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -79,8 +79,8 @@ namespace TestOutput
__PTagHelper = CreateTagHelper<PTagHelper>(); __PTagHelper = CreateTagHelper<PTagHelper>();
__tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Add(__PTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute("class", "Hello World"); __tagHelperExecutionContext.AddHtmlAttribute("class", "Hello World");
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(212, 8, true); Instrumentation.BeginContext(212, 8, true);
WriteLiteral("\r\n</div>"); WriteLiteral("\r\n</div>");

View File

@ -71,15 +71,15 @@ namespace TestOutput
__InputTagHelper2.Type = __InputTagHelper.Type; __InputTagHelper2.Type = __InputTagHelper.Type;
__tagHelperExecutionContext.AddHtmlAttribute("value", ""); __tagHelperExecutionContext.AddHtmlAttribute("value", "");
__tagHelperExecutionContext.AddHtmlAttribute("placeholder", "Enter in a new time..."); __tagHelperExecutionContext.AddHtmlAttribute("placeholder", "Enter in a new time...");
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
} }
, StartTagHelperWritingScope, EndTagHelperWritingScope); , StartTagHelperWritingScope, EndTagHelperWritingScope);
__PTagHelper = CreateTagHelper<PTagHelper>(); __PTagHelper = CreateTagHelper<PTagHelper>();
__tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Add(__PTagHelper);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n"); WriteLiteral("\r\n");
#line 13 "ComplexTagHelpers.cshtml" #line 13 "ComplexTagHelpers.cshtml"
@ -116,15 +116,15 @@ Write(checkbox);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
} }
, StartTagHelperWritingScope, EndTagHelperWritingScope); , StartTagHelperWritingScope, EndTagHelperWritingScope);
__PTagHelper = CreateTagHelper<PTagHelper>(); __PTagHelper = CreateTagHelper<PTagHelper>();
__tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Add(__PTagHelper);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => {
@ -144,8 +144,8 @@ Write(true ? "checkbox" : "anything");
__InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>();
__tagHelperExecutionContext.Add(__InputTagHelper2); __tagHelperExecutionContext.Add(__InputTagHelper2);
__InputTagHelper2.Type = __InputTagHelper.Type; __InputTagHelper2.Type = __InputTagHelper.Type;
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => {
@ -180,8 +180,8 @@ if(true) {
__InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>();
__tagHelperExecutionContext.Add(__InputTagHelper2); __tagHelperExecutionContext.Add(__InputTagHelper2);
__InputTagHelper2.Type = __InputTagHelper.Type; __InputTagHelper2.Type = __InputTagHelper.Type;
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n"); WriteLiteral("\r\n");
#line 19 "ComplexTagHelpers.cshtml" #line 19 "ComplexTagHelpers.cshtml"
@ -204,8 +204,8 @@ Write(DateTime.Now);
#line hidden #line hidden
__tagHelperStringValueBuffer = EndTagHelperWritingScope(); __tagHelperStringValueBuffer = EndTagHelperWritingScope();
__tagHelperExecutionContext.AddHtmlAttribute("time", __tagHelperStringValueBuffer.ToString()); __tagHelperExecutionContext.AddHtmlAttribute("time", __tagHelperStringValueBuffer.ToString());
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(672, 10, true); Instrumentation.BeginContext(672, 10, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
@ -238,8 +238,8 @@ __InputTagHelper2.Checked = @object;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -252,8 +252,8 @@ __PTagHelper.Age = DateTimeOffset.Now.Year - 1970;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(819, 10, true); Instrumentation.BeginContext(819, 10, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
@ -273,8 +273,8 @@ __InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -287,8 +287,8 @@ __PTagHelper.Age = -1970 + DateTimeOffset.Now.Year;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(952, 10, true); Instrumentation.BeginContext(952, 10, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
@ -308,8 +308,8 @@ __InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -322,8 +322,8 @@ __PTagHelper.Age = DateTimeOffset.Now.Year - 1970;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(1080, 10, true); Instrumentation.BeginContext(1080, 10, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
@ -343,8 +343,8 @@ __InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014 ;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -357,8 +357,8 @@ __PTagHelper.Age = "My age is this long.".Length;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(1223, 14, true); Instrumentation.BeginContext(1223, 14, true);
WriteLiteral("\r\n </div>\r\n"); WriteLiteral("\r\n </div>\r\n");

View File

@ -46,8 +46,8 @@ __InputTagHelper2.Checked = ;
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.AddHtmlAttribute("class", ""); __tagHelperExecutionContext.AddHtmlAttribute("class", "");
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(74, 6, true); Instrumentation.BeginContext(74, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
@ -71,8 +71,8 @@ __InputTagHelper2.Checked = ;
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.AddHtmlAttribute("class", ""); __tagHelperExecutionContext.AddHtmlAttribute("class", "");
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -85,8 +85,8 @@ __PTagHelper.Age = ;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(144, 8, true); Instrumentation.BeginContext(144, 8, true);
WriteLiteral("\r\n</div>"); WriteLiteral("\r\n</div>");

View File

@ -61,8 +61,8 @@ Write(DateTime.Now);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(231, 18, true); Instrumentation.BeginContext(231, 18, true);
WriteLiteral("\r\n </p>\r\n</div>"); WriteLiteral("\r\n </p>\r\n</div>");

View File

@ -40,8 +40,8 @@ namespace TestOutput
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age);
__tagHelperExecutionContext.AddHtmlAttribute("class", "Hello World"); __tagHelperExecutionContext.AddHtmlAttribute("class", "Hello World");
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
} }
#pragma warning restore 1998 #pragma warning restore 1998

View File

@ -53,8 +53,8 @@ namespace TestOutput
, StartTagHelperWritingScope, EndTagHelperWritingScope); , StartTagHelperWritingScope, EndTagHelperWritingScope);
__NestedTagHelper = CreateTagHelper<NestedTagHelper>(); __NestedTagHelper = CreateTagHelper<NestedTagHelper>();
__tagHelperExecutionContext.Add(__NestedTagHelper); __tagHelperExecutionContext.Add(__NestedTagHelper);
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperAsync(__tagHelperExecutionContext).Wait(); await WriteTagHelperAsync(__tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
} }
@ -80,8 +80,8 @@ Write(DateTime.Now);
#line hidden #line hidden
__tagHelperStringValueBuffer = EndTagHelperWritingScope(); __tagHelperStringValueBuffer = EndTagHelperWritingScope();
__tagHelperExecutionContext.AddHtmlAttribute("unboundproperty", __tagHelperStringValueBuffer.ToString()); __tagHelperExecutionContext.AddHtmlAttribute("unboundproperty", __tagHelperStringValueBuffer.ToString());
__tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
WriteTagHelperToAsync(__razor_template_writer, __tagHelperExecutionContext).Wait(); await WriteTagHelperToAsync(__razor_template_writer, __tagHelperExecutionContext);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(359, 14, true); Instrumentation.BeginContext(359, 14, true);
WriteLiteralTo(__razor_template_writer, "\r\n </div>\r\n"); WriteLiteralTo(__razor_template_writer, "\r\n </div>\r\n");