#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper.Type = "checkbox"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); #line 3 "DuplicateTargetTagHelper.cshtml" __InputTagHelper.Checked = true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper.Checked); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __CatchAllTagHelper.Type = __InputTagHelper.Type; __CatchAllTagHelper.Checked = __InputTagHelper.Checked; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(27, 13, true); WriteLiteral("\r\n<div>\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper.Type = ""; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; #line 4 "EmptyAttributeTagHelpers.cshtml" __InputTagHelper2.Checked = ; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(74, 6, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper.Type = ""; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; #line 6 "EmptyAttributeTagHelpers.cshtml" __InputTagHelper2.Checked = ; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 49, true); WriteLiteral("\r\n<div class=\"randomNonTagHelperAttribute\">\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper.Type = **From custom attribute code renderer**: "text"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper.Type = **From custom attribute code renderer**: "checkbox"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; #line 7 "BasicTagHelpers.cshtml" __InputTagHelper2.Checked = **From custom attribute code renderer**: true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(27, 72, true); WriteLiteral("\r\n<div class=\"randomNonTagHelperAttribute\">\r\n <p class=\"Hello World\" "); Instrumentation.EndContext(); Instrumentation.BeginContext(102, 12, false); #line 4 "EscapedTagHelpers.cshtml" Write(DateTime.Now); #line default #line hidden Instrumentation.EndContext(); Instrumentation.BeginContext(114, 69, true); WriteLiteral(">\r\n <input type=\"text\" />\r\n <em>Not a TagHelper: </em> "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); StartTagHelperWritingScope(); #line 6 "EscapedTagHelpers.cshtml" WriteLiteral(DateTime.Now); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Type = __tagHelperStringValueBuffer.GetContent(HtmlEncoder); __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; #line 6 "EscapedTagHelpers.cshtml" __InputTagHelper2.Checked = true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(186, 45, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(231, 18, true); WriteLiteral("\r\n </p>\r\n</div>"); Instrumentation.EndContext(); }
public async Task RunAsync_CallsInitPriorToProcessAsync() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", TagMode.StartTagAndEndTag); var incrementer = 0; var callbackTagHelper = new CallbackTagHelper( initCallback: () => { Assert.Equal(0, incrementer); incrementer++; }, processAsyncCallback: () => { Assert.Equal(1, incrementer); incrementer++; }); executionContext.Add(callbackTagHelper); // Act await runner.RunAsync(executionContext); // Assert Assert.Equal(2, incrementer); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(69, 11, true); WriteLiteral("Body of Tag"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("Hello World")); #line 3 "SingleTagHelper.cshtml" __PTagHelper.Age = 1337; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(35, 49, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
public void Add_MaintainsMultipleTagHelpers() { // Arrange var executionContext = new TagHelperExecutionContext("p", selfClosing: false); var tagHelper1 = new PTagHelper(); var tagHelper2 = new PTagHelper(); // Act executionContext.Add(tagHelper1); executionContext.Add(tagHelper2); // Assert var tagHelpers = executionContext.TagHelpers.ToArray(); Assert.Equal(2, tagHelpers.Length); Assert.Same(tagHelper1, tagHelpers[0]); Assert.Same(tagHelper2, tagHelpers[1]); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { WriteLiteral("\r\n"); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("inputTest"); __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper <Microsoft.AspNet.Mvc.Razor.InputTestTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper); __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now); __tagHelperExecutionContext.AddTagHelperAttribute("For", __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For); __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag()); WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag()); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
public void Add_MaintainsTagHelpers() { // Arrange var executionContext = new TagHelperExecutionContext("p"); var tagHelper = new PTagHelper(); // Act executionContext.Add(tagHelper); // Assert var singleTagHelper = Assert.Single(executionContext.TagHelpers); Assert.Same(tagHelper, singleTagHelper); }
public async Task RunAsync_AllowsDataRetrievalFromTagHelperContext() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", selfClosing: false); var tagHelper = new TagHelperContextTouchingTagHelper(); // Act executionContext.Add(tagHelper); executionContext.AddTagHelperAttribute("foo", true); var output = await runner.RunAsync(executionContext); // Assert Assert.Equal("True", output.Attributes["foo"]); }
public async Task RunAsync_WithContentSetsOutputsContent() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p"); var tagHelper = new ExecutableTagHelper(); var contentWriter = new StringWriter(new StringBuilder("Hello World")); // Act executionContext.Add(tagHelper); var output = await runner.RunAsync(executionContext, contentWriter); // Assert Assert.Equal(output.Content, "Hello World"); }
public async Task RunAsync_SetsTagHelperOutputTagMode(TagMode tagMode) { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", tagMode); var tagHelper = new TagHelperContextTouchingTagHelper(); executionContext.Add(tagHelper); executionContext.AddTagHelperAttribute("foo", true); // Act var output = await runner.RunAsync(executionContext); // Assert Assert.Equal(tagMode, output.TagMode); }
public async Task RunAsync_SetTagHelperOutputSelfClosing(bool selfClosing) { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", selfClosing); var tagHelper = new TagHelperContextTouchingTagHelper(); executionContext.Add(tagHelper); executionContext.AddTagHelperAttribute("foo", true); // Act var output = await runner.RunAsync(executionContext); // Assert Assert.Equal(selfClosing, output.SelfClosing); }
public async Task RunAsync_ConfiguresTagHelperContextWithExecutionContextsItems() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", selfClosing: false); var tagHelper = new ContextInspectingTagHelper(); executionContext.Add(tagHelper); // Act await runner.RunAsync(executionContext); // Assert Assert.NotNull(tagHelper.ContextProcessedWith); Assert.Same(tagHelper.ContextProcessedWith.Items, executionContext.Items); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new Microsoft.AspNet.Razor.Runtime.TagHelpers.TagHelperRunner(); BeginContext(120, 2, true); WriteLiteral("\r\n"); EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper <Microsoft.AspNet.Mvc.Razor.InputTestTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper); #line 5 "TestFiles/Input/ModelExpressionTagHelper.cshtml" __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); BeginContext(122, 24, false); await WriteTagHelperAsync(__tagHelperExecutionContext); EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); BeginContext(146, 2, true); WriteLiteral("\r\n"); EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper <Microsoft.AspNet.Mvc.Razor.InputTestTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper); #line 6 "TestFiles/Input/ModelExpressionTagHelper.cshtml" __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => Model); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); BeginContext(148, 27, false); await WriteTagHelperAsync(__tagHelperExecutionContext); EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(35, 10, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
public async Task RunAsync_AllowsModificationOfTagHelperOutput() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", selfClosing: false); var executableTagHelper = new ExecutableTagHelper(); // Act executionContext.Add(executableTagHelper); executionContext.AddHtmlAttribute("class", "btn"); var output = await runner.RunAsync(executionContext); // Assert Assert.Equal("foo", output.TagName); Assert.Equal("somethingelse", output.Attributes["class"]); Assert.Equal("world", output.Attributes["hello"]); Assert.Equal(true, output.SelfClosing); }
public async Task RunAsync_OrdersTagHelpers( int[] tagHelperOrders, int[] expectedTagHelperOrders) { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", selfClosing: false); var processOrder = new List <int>(); foreach (var order in tagHelperOrders) { var orderedTagHelper = new OrderedTagHelper(order) { ProcessOrderTracker = processOrder }; executionContext.Add(orderedTagHelper); } // Act await runner.RunAsync(executionContext); // Assert Assert.Equal(expectedTagHelperOrders, processOrder); }
public async Task RunAsync_OrdersTagHelpers( int[] tagHelperOrders, int[] expectedTagHelperOrders) { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", TagMode.StartTagAndEndTag); var processOrder = new List<int>(); foreach (var order in tagHelperOrders) { var orderedTagHelper = new OrderedTagHelper(order) { ProcessOrderTracker = processOrder }; executionContext.Add(orderedTagHelper); } // Act await runner.RunAsync(executionContext); // Assert Assert.Equal(expectedTagHelperOrders, processOrder); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(25, 253, true); WriteLiteral("\r\n<ul [item]=\"items\"></ul>\r\n<ul [(item)]=\"items\"></ul>\r\n<button (click)=\"doSometh" + "ing()\">Click Me</button>\r\n<button (^click)=\"doSomething()\">Click Me</button>\r\n<t" + "emplate *something=\"value\">\r\n</template>\r\n<div #local></div>\r\n<div #local=\"value" + "\"></div>\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("ul", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __tagHelperExecutionContext.AddMinimizedHtmlAttribute("bound"); #line 12 "SymbolBoundAttributes.cshtml" __CatchAllTagHelper.ListItems = items; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("[item]", __CatchAllTagHelper.ListItems); __tagHelperExecutionContext.AddHtmlAttribute("[item]", Html.Raw("items")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(278, 45, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(323, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("ul", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __tagHelperExecutionContext.AddMinimizedHtmlAttribute("bound"); #line 13 "SymbolBoundAttributes.cshtml" __CatchAllTagHelper.ArrayItems = items; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("[(item)]", __CatchAllTagHelper.ArrayItems); __tagHelperExecutionContext.AddHtmlAttribute("[(item)]", Html.Raw("items")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(325, 49, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(374, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("button", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(438, 8, true); WriteLiteral("Click Me"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __tagHelperExecutionContext.AddMinimizedHtmlAttribute("bound"); #line 14 "SymbolBoundAttributes.cshtml" __CatchAllTagHelper.Event1 = doSomething(); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("(click)", __CatchAllTagHelper.Event1); __tagHelperExecutionContext.AddHtmlAttribute("(click)", Html.Raw("doSomething()")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(376, 79, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(455, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("button", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(521, 8, true); WriteLiteral("Click Me"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __tagHelperExecutionContext.AddMinimizedHtmlAttribute("bound"); #line 15 "SymbolBoundAttributes.cshtml" __CatchAllTagHelper.Event2 = doSomething(); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("(^click)", __CatchAllTagHelper.Event2); __tagHelperExecutionContext.AddHtmlAttribute("(^click)", Html.Raw("doSomething()")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(457, 81, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(538, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("template", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(594, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __tagHelperExecutionContext.AddMinimizedHtmlAttribute("bound"); __CatchAllTagHelper.StringProperty1 = "value"; __tagHelperExecutionContext.AddTagHelperAttribute("*something", __CatchAllTagHelper.StringProperty1); __tagHelperExecutionContext.AddHtmlAttribute("*something", Html.Raw("value")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(540, 67, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(607, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __tagHelperExecutionContext.AddMinimizedHtmlAttribute("bound"); __tagHelperExecutionContext.AddMinimizedHtmlAttribute("#localminimized"); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(609, 33, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(642, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __tagHelperExecutionContext.AddMinimizedHtmlAttribute("bound"); __CatchAllTagHelper.StringProperty2 = "value"; __tagHelperExecutionContext.AddTagHelperAttribute("#local", __CatchAllTagHelper.StringProperty2); __tagHelperExecutionContext.AddHtmlAttribute("#local", Html.Raw("value")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(644, 47, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
public void Add_MaintainsTagHelpers() { // Arrange var executionContext = new TagHelperExecutionContext("p", selfClosing: false); var tagHelper = new PTagHelper(); // Act executionContext.Add(tagHelper); // Assert var singleTagHelper = Assert.Single(executionContext.TagHelpers); Assert.Same(tagHelper, singleTagHelper); }
public async Task Process_AddsHiddenInputTag_FromEndOfFormContent_WithCachedBody( List<TagBuilder> tagBuilderList, string expectedOutput) { // Arrange var viewContext = new ViewContext(); var runner = new TagHelperRunner(); var tagHelperExecutionContext = new TagHelperExecutionContext( "form", TagMode.StartTagAndEndTag, items: new Dictionary<object, object>(), uniqueId: string.Empty, executeChildContentAsync: () => { foreach (var item in tagBuilderList) { viewContext.FormContext.EndOfFormContent.Add(item); } return Task.FromResult(true); }, startTagHelperWritingScope: () => { }, endTagHelperWritingScope: () => new DefaultTagHelperContent()); // This TagHelper will pre-execute the child content forcing the body to be cached. tagHelperExecutionContext.Add(new ChildContentInvoker()); tagHelperExecutionContext.Add(new RenderAtEndOfFormTagHelper { ViewContext = viewContext }); // Act var output = await runner.RunAsync(tagHelperExecutionContext); // Assert Assert.Equal(expectedOutput, output.PostContent.GetContent()); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); #line 3 "PrefixedAttributeTagHelpers.cshtml" var literate = "or illiterate"; var intDictionary = new Dictionary<string, int> { { "three", 3 }, }; var stringDictionary = new SortedDictionary<string, string> { { "name", "value" }, }; #line default #line hidden Instrumentation.BeginContext(282, 49, true); WriteLiteral("\r\n<div class=\"randomNonTagHelperAttribute\">\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper1 = CreateTagHelper<InputTagHelper1>(); __tagHelperExecutionContext.Add(__InputTagHelper1); __tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw("checkbox")); #line 16 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.IntDictionaryProperty = intDictionary; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __InputTagHelper2.IntDictionaryProperty); __InputTagHelper1.IntDictionaryProperty = __InputTagHelper2.IntDictionaryProperty; #line 16 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.StringDictionaryProperty = stringDictionary; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("string-dictionary", __InputTagHelper2.StringDictionaryProperty); __InputTagHelper1.StringDictionaryProperty = __InputTagHelper2.StringDictionaryProperty; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(331, 92, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(423, 6, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); if (__InputTagHelper2.IntDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("int-prefix-garlic", "InputTagHelper2", "IntDictionaryProperty")); } __InputTagHelper1 = CreateTagHelper<InputTagHelper1>(); __tagHelperExecutionContext.Add(__InputTagHelper1); if (__InputTagHelper1.IntDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("int-prefix-garlic", "InputTagHelper1", "IntDictionaryProperty")); } __tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw("password")); #line 17 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.IntDictionaryProperty = intDictionary; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __InputTagHelper2.IntDictionaryProperty); __InputTagHelper1.IntDictionaryProperty = __InputTagHelper2.IntDictionaryProperty; #line 17 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.IntDictionaryProperty["garlic"] = 37; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-garlic", __InputTagHelper2.IntDictionaryProperty["garlic"]); __InputTagHelper1.IntDictionaryProperty["garlic"] = __InputTagHelper2.IntDictionaryProperty["garlic"]; #line 17 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.IntDictionaryProperty["grabber"] = 42; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __InputTagHelper2.IntDictionaryProperty["grabber"]); __InputTagHelper1.IntProperty = __InputTagHelper2.IntDictionaryProperty["grabber"]; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(429, 103, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(532, 6, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); if (__InputTagHelper2.IntDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("int-prefix-grabber", "InputTagHelper2", "IntDictionaryProperty")); } if (__InputTagHelper2.StringDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("string-prefix-grabber", "InputTagHelper2", "StringDictionaryProperty")); } __InputTagHelper1 = CreateTagHelper<InputTagHelper1>(); __tagHelperExecutionContext.Add(__InputTagHelper1); if (__InputTagHelper1.IntDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("int-prefix-salt", "InputTagHelper1", "IntDictionaryProperty")); } if (__InputTagHelper1.StringDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("string-prefix-paprika", "InputTagHelper1", "StringDictionaryProperty")); } __tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw("radio")); #line 19 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.IntDictionaryProperty["grabber"] = 42; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __InputTagHelper2.IntDictionaryProperty["grabber"]); __InputTagHelper1.IntProperty = __InputTagHelper2.IntDictionaryProperty["grabber"]; #line 19 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.IntDictionaryProperty["salt"] = 37; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-salt", __InputTagHelper2.IntDictionaryProperty["salt"]); __InputTagHelper1.IntDictionaryProperty["salt"] = __InputTagHelper2.IntDictionaryProperty["salt"]; #line 19 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.IntDictionaryProperty["pepper"] = 98; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-pepper", __InputTagHelper2.IntDictionaryProperty["pepper"]); __InputTagHelper1.IntDictionaryProperty["pepper"] = __InputTagHelper2.IntDictionaryProperty["pepper"]; __tagHelperExecutionContext.AddHtmlAttribute("int-prefix-salt", Html.Raw("8")); __InputTagHelper2.StringDictionaryProperty["grabber"] = "string"; __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-grabber", __InputTagHelper2.StringDictionaryProperty["grabber"]); __InputTagHelper1.StringProperty = __InputTagHelper2.StringDictionaryProperty["grabber"]; __InputTagHelper2.StringDictionaryProperty["paprika"] = "another string"; __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-paprika", __InputTagHelper2.StringDictionaryProperty["paprika"]); __InputTagHelper1.StringDictionaryProperty["paprika"] = __InputTagHelper2.StringDictionaryProperty["paprika"]; StartTagHelperWritingScope(); WriteLiteral("literate "); #line 21 "PrefixedAttributeTagHelpers.cshtml" WriteLiteral(literate); #line default #line hidden WriteLiteral("?"); __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper2.StringDictionaryProperty["cumin"] = __tagHelperStringValueBuffer.GetContent(HtmlEncoder); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-cumin", __InputTagHelper2.StringDictionaryProperty["cumin"]); __InputTagHelper1.StringDictionaryProperty["cumin"] = __InputTagHelper2.StringDictionaryProperty["cumin"]; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(538, 257, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(795, 6, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); if (__InputTagHelper2.IntDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("int-prefix-value", "InputTagHelper2", "IntDictionaryProperty")); } if (__InputTagHelper2.StringDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("string-prefix-thyme", "InputTagHelper2", "StringDictionaryProperty")); } __InputTagHelper1 = CreateTagHelper<InputTagHelper1>(); __tagHelperExecutionContext.Add(__InputTagHelper1); if (__InputTagHelper1.IntDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("int-prefix-value", "InputTagHelper1", "IntDictionaryProperty")); } if (__InputTagHelper1.StringDictionaryProperty == null) { throw new InvalidOperationException(FormatInvalidIndexerAssignment("string-prefix-thyme", "InputTagHelper1", "StringDictionaryProperty")); } #line 22 "PrefixedAttributeTagHelpers.cshtml" __InputTagHelper2.IntDictionaryProperty["value"] = 37; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-value", __InputTagHelper2.IntDictionaryProperty["value"]); __InputTagHelper1.IntDictionaryProperty["value"] = __InputTagHelper2.IntDictionaryProperty["value"]; __InputTagHelper2.StringDictionaryProperty["thyme"] = "string"; __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-thyme", __InputTagHelper2.StringDictionaryProperty["thyme"]); __InputTagHelper1.StringDictionaryProperty["thyme"] = __InputTagHelper2.StringDictionaryProperty["thyme"]; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(801, 60, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(861, 8, true); WriteLiteral("\r\n</div>"); Instrumentation.EndContext(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 71, true); WriteLiteral("\r\n<div data-animation=\"fade\" class=\"randomNonTagHelperAttribute\">\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(145, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(155, 7, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(162, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.StartTagOnly, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); StartTagHelperWritingScope(); WriteLiteral("2000 + "); #line 6 "BasicTagHelpers.cshtml" Write(ViewBag.DefaultInterval); #line default #line hidden WriteLiteral(" + 1"); __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer.GetContent(HtmlEncoder))); __InputTagHelper.Type = **From custom attribute code renderer**: "text"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(172, 71, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(243, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper.Type = **From custom attribute code renderer**: "checkbox"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; #line 7 "BasicTagHelpers.cshtml" __InputTagHelper2.Checked = **From custom attribute code renderer**: true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(253, 39, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(292, 6, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(30, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(47, 9, true); WriteLiteral("\r\n <p>"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("strong", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(78, 5, true); WriteLiteral("Hello"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("catchAll", Html.Raw("hi")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(56, 36, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(92, 62, true); WriteLiteral("<strong>World</strong></p>\r\n <input checked=\"true\" />\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper.Type = "checkbox"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; #line 6 "AttributeTargetingTagHelpers.cshtml" __InputTagHelper2.Checked = true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(154, 40, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(194, 6, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __CatchAllTagHelper = CreateTagHelper<CatchAllTagHelper>(); __tagHelperExecutionContext.Add(__CatchAllTagHelper); __InputTagHelper.Type = "checkbox"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; #line 7 "AttributeTargetingTagHelpers.cshtml" __InputTagHelper2.Checked = true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddHtmlAttribute("catchAll", Html.Raw("hi")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(200, 54, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(254, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("btn")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(32, 228, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); #line 3 "ComplexTagHelpers.cshtml" if (true) { var checkbox = "checkbox"; #line default #line hidden Instrumentation.BeginContext(84, 55, true); WriteLiteral(" <div class=\"randomNonTagHelperAttribute\">\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("\r\n <h1>Set Time:</h1>\r\n"); #line 10 "ComplexTagHelpers.cshtml" #line default #line hidden #line 10 "ComplexTagHelpers.cshtml" if (false) { #line default #line hidden WriteLiteral(" "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("New Time: "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper.Type = "text"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.AddHtmlAttribute("value", Html.Raw("")); __tagHelperExecutionContext.AddHtmlAttribute("placeholder", Html.Raw("Enter in a new time...")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n"); #line 13 "ComplexTagHelpers.cshtml" } else { #line default #line hidden WriteLiteral(" "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("Current Time: "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); StartTagHelperWritingScope(); #line 16 "ComplexTagHelpers.cshtml" WriteLiteral(checkbox); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Type = __tagHelperStringValueBuffer.ToString(); __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; #line 16 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); StartTagHelperWritingScope(); #line 17 "ComplexTagHelpers.cshtml" WriteLiteral(true ? "checkbox" : "anything"); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Type = __tagHelperStringValueBuffer.ToString(); __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); StartTagHelperWritingScope(); #line 18 "ComplexTagHelpers.cshtml" if(true) { #line default #line hidden WriteLiteral(" checkbox "); #line 18 "ComplexTagHelpers.cshtml" } else { #line default #line hidden WriteLiteral(" anything "); #line 18 "ComplexTagHelpers.cshtml" } #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Type = __tagHelperStringValueBuffer.ToString(); __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n"); #line 19 "ComplexTagHelpers.cshtml" } #line default #line hidden WriteLiteral(" "); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); StartTagHelperWritingScope(); WriteLiteral("Current Time: "); #line 8 "ComplexTagHelpers.cshtml" Write(DateTime.Now); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __tagHelperExecutionContext.AddHtmlAttribute("time", Html.Raw(__tagHelperStringValueBuffer.ToString())); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(672, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("\r\n"); #line 22 "ComplexTagHelpers.cshtml" #line default #line hidden #line 22 "ComplexTagHelpers.cshtml" var @object = false; #line default #line hidden WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); #line 23 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = @object; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 21 "ComplexTagHelpers.cshtml" __PTagHelper.Age = DateTimeOffset.Now.Year - 1970; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(819, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); #line 26 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 25 "ComplexTagHelpers.cshtml" __PTagHelper.Age = -1970 + DateTimeOffset.Now.Year; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(952, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); #line 29 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 28 "ComplexTagHelpers.cshtml" __PTagHelper.Age = DateTimeOffset.Now.Year - 1970; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(1080, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); #line 32 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014 ; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 31 "ComplexTagHelpers.cshtml" __PTagHelper.Age = "My age is this long.".Length; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(1223, 14, true); WriteLiteral("\r\n </div>\r\n"); Instrumentation.EndContext(); #line 35 "ComplexTagHelpers.cshtml" } #line default #line hidden }
public void Add_MaintainsTagHelpers() { // Arrange var executionContext = new TagHelperExecutionContext("p", TagMode.StartTagAndEndTag); var tagHelper = new PTagHelper(); // Act executionContext.Add(tagHelper); // Assert var singleTagHelper = Assert.Single(executionContext.TagHelpers); Assert.Same(tagHelper, singleTagHelper); }
public async Task RunAsync_AllowsDataRetrievalFromTagHelperContext() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", TagMode.StartTagAndEndTag); var tagHelper = new TagHelperContextTouchingTagHelper(); // Act executionContext.Add(tagHelper); executionContext.AddTagHelperAttribute("foo", true); var output = await runner.RunAsync(executionContext); // Assert Assert.Equal("True", output.Attributes["foo"].Value); }
public async Task RunAsync_ProcessesAllTagHelpers() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", TagMode.StartTagAndEndTag); var executableTagHelper1 = new ExecutableTagHelper(); var executableTagHelper2 = new ExecutableTagHelper(); // Act executionContext.Add(executableTagHelper1); executionContext.Add(executableTagHelper2); await runner.RunAsync(executionContext); // Assert Assert.True(executableTagHelper1.Processed); Assert.True(executableTagHelper2.Processed); }
public async Task RunAsync_AllowsModificationOfTagHelperOutput() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", TagMode.StartTagAndEndTag); var executableTagHelper = new ExecutableTagHelper(); // Act executionContext.Add(executableTagHelper); executionContext.AddHtmlAttribute("class", "btn"); var output = await runner.RunAsync(executionContext); // Assert Assert.Equal("foo", output.TagName); Assert.Equal("somethingelse", output.Attributes["class"].Value); Assert.Equal("world", output.Attributes["hello"].Value); Assert.Equal(TagMode.SelfClosing, output.TagMode); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); AddHtmlAttributeValues("unbound", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 51), Tuple.Create("prefix", 51), true), Tuple.Create(Tuple.Create(" ", 57), Tuple.Create<System.Object, System.Int32>(DateTime.Now, 58), false)); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(35, 40, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(75, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); AddHtmlAttributeValues("unbound", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 95), Tuple.Create<System.Object, System.Int32>(new Template((__razor_attribute_value_writer) => { #line 5 "DynamicAttributeTagHelpers.cshtml" if (true) { #line default #line hidden Instrumentation.BeginContext(109, 12, false); #line 5 "DynamicAttributeTagHelpers.cshtml" WriteTo(__razor_attribute_value_writer, string.Empty); #line default #line hidden Instrumentation.EndContext(); #line 5 "DynamicAttributeTagHelpers.cshtml" } else { #line default #line hidden Instrumentation.BeginContext(132, 5, false); #line 5 "DynamicAttributeTagHelpers.cshtml" WriteTo(__razor_attribute_value_writer, false); #line default #line hidden Instrumentation.EndContext(); #line 5 "DynamicAttributeTagHelpers.cshtml" } #line default #line hidden } ), 95), false), Tuple.Create(Tuple.Create(" ", 139), Tuple.Create("suffix", 140), true)); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(79, 71, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(150, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); StartTagHelperWritingScope(); WriteLiteral("prefix "); #line 7 "DynamicAttributeTagHelpers.cshtml" WriteLiteral(DateTime.Now); #line default #line hidden WriteLiteral(" suffix"); __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Bound = __tagHelperStringValueBuffer.ToString(); __tagHelperExecutionContext.AddTagHelperAttribute("bound", __InputTagHelper.Bound); AddHtmlAttributeValues("unbound", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 206), Tuple.Create("prefix", 206), true), Tuple.Create(Tuple.Create(" ", 212), Tuple.Create<System.Object, System.Int32>(DateTime.Now, 213), false), Tuple.Create(Tuple.Create(" ", 226), Tuple.Create("suffix", 227), true)); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(154, 83, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(237, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); StartTagHelperWritingScope(); #line 9 "DynamicAttributeTagHelpers.cshtml" WriteLiteral(long.MinValue); #line default #line hidden WriteLiteral(" "); #line 9 "DynamicAttributeTagHelpers.cshtml" if (true) { #line default #line hidden #line 9 "DynamicAttributeTagHelpers.cshtml" WriteLiteral(string.Empty); #line default #line hidden #line 9 "DynamicAttributeTagHelpers.cshtml" } else { #line default #line hidden #line 9 "DynamicAttributeTagHelpers.cshtml" WriteLiteral(false); #line default #line hidden #line 9 "DynamicAttributeTagHelpers.cshtml" } #line default #line hidden WriteLiteral(" "); #line 9 "DynamicAttributeTagHelpers.cshtml" WriteLiteral(int.MaxValue); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Bound = __tagHelperStringValueBuffer.ToString(); __tagHelperExecutionContext.AddTagHelperAttribute("bound", __InputTagHelper.Bound); AddHtmlAttributeValues("unbound", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 347), Tuple.Create<System.Object, System.Int32>(long.MinValue, 347), false), Tuple.Create(Tuple.Create(" ", 361), Tuple.Create<System.Object, System.Int32>(new Template((__razor_attribute_value_writer) => { #line 10 "DynamicAttributeTagHelpers.cshtml" if (true) { #line default #line hidden Instrumentation.BeginContext(376, 12, false); #line 10 "DynamicAttributeTagHelpers.cshtml" WriteTo(__razor_attribute_value_writer, string.Empty); #line default #line hidden Instrumentation.EndContext(); #line 10 "DynamicAttributeTagHelpers.cshtml" } else { #line default #line hidden Instrumentation.BeginContext(399, 5, false); #line 10 "DynamicAttributeTagHelpers.cshtml" WriteTo(__razor_attribute_value_writer, false); #line default #line hidden Instrumentation.EndContext(); #line 10 "DynamicAttributeTagHelpers.cshtml" } #line default #line hidden } ), 362), false), Tuple.Create(Tuple.Create(" ", 406), Tuple.Create<System.Object, System.Int32>(int.MaxValue, 407), false)); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(241, 183, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(424, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); AddHtmlAttributeValues("unbound", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 444), Tuple.Create<System.Object, System.Int32>(long.MinValue, 444), false), Tuple.Create(Tuple.Create(" ", 458), Tuple.Create<System.Object, System.Int32>(DateTime.Now, 459), false), Tuple.Create(Tuple.Create(" ", 472), Tuple.Create("static", 473), true), Tuple.Create(Tuple.Create(" ", 479), Tuple.Create("content", 483), true), Tuple.Create(Tuple.Create(" ", 490), Tuple.Create<System.Object, System.Int32>(int.MaxValue, 491), false)); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(428, 80, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(508, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); AddHtmlAttributeValues("unbound", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 528), Tuple.Create<System.Object, System.Int32>(new Template((__razor_attribute_value_writer) => { #line 14 "DynamicAttributeTagHelpers.cshtml" if (true) { #line default #line hidden Instrumentation.BeginContext(542, 12, false); #line 14 "DynamicAttributeTagHelpers.cshtml" WriteTo(__razor_attribute_value_writer, string.Empty); #line default #line hidden Instrumentation.EndContext(); #line 14 "DynamicAttributeTagHelpers.cshtml" } else { #line default #line hidden Instrumentation.BeginContext(565, 5, false); #line 14 "DynamicAttributeTagHelpers.cshtml" WriteTo(__razor_attribute_value_writer, false); #line default #line hidden Instrumentation.EndContext(); #line 14 "DynamicAttributeTagHelpers.cshtml" } #line default #line hidden } ), 528), false)); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(512, 64, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
public async Task RunAsync_ConfiguresTagHelperContextWithExecutionContextsItems() { // Arrange var runner = new TagHelperRunner(); var executionContext = new TagHelperExecutionContext("p", TagMode.StartTagAndEndTag); var tagHelper = new ContextInspectingTagHelper(); executionContext.Add(tagHelper); // Act await runner.RunAsync(executionContext); // Assert Assert.NotNull(tagHelper.ContextProcessedWith); Assert.Same(tagHelper.ContextProcessedWith.Items, executionContext.Items); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(65, 6, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper.Type = "button"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.AddHtmlAttribute("TYPE", Html.Raw("checkbox")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(71, 39, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(110, 6, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper.Type = "button"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; #line 5 "DuplicateAttributeTagHelpers.cshtml" __InputTagHelper2.Checked = true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw("checkbox")); __tagHelperExecutionContext.AddHtmlAttribute("checked", Html.Raw("false")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(116, 70, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(186, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 3 "DuplicateAttributeTagHelpers.cshtml" __PTagHelper.Age = 3; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddHtmlAttribute("AGE", Html.Raw("40")); __tagHelperExecutionContext.AddHtmlAttribute("Age", Html.Raw("500")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(35, 157, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); #line 3 "ComplexTagHelpers.cshtml" if (true) { var checkbox = "checkbox"; #line default #line hidden Instrumentation.BeginContext(84, 55, true); WriteLiteral(" <div class=\"randomNonTagHelperAttribute\">\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(177, 34, true); WriteLiteral("\r\n <h1>Set Time:</h1>\r\n"); Instrumentation.EndContext(); #line 10 "ComplexTagHelpers.cshtml" #line default #line hidden #line 10 "ComplexTagHelpers.cshtml" if (false) { #line default #line hidden Instrumentation.BeginContext(251, 16, true); WriteLiteral(" "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(270, 10, true); WriteLiteral("New Time: "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper.Type = "text"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.AddHtmlAttribute("value", Html.Raw("")); __tagHelperExecutionContext.AddHtmlAttribute("placeholder", Html.Raw("Enter in a new time...")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(280, 66, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(267, 83, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(350, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); #line 13 "ComplexTagHelpers.cshtml" } else { #line default #line hidden Instrumentation.BeginContext(400, 16, true); WriteLiteral(" "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(419, 14, true); WriteLiteral("Current Time: "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); StartTagHelperWritingScope(); #line 16 "ComplexTagHelpers.cshtml" WriteLiteral(checkbox); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Type = __tagHelperStringValueBuffer.GetContent(HtmlEncoder); __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; #line 16 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(433, 37, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(416, 58, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(474, 18, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); StartTagHelperWritingScope(); #line 17 "ComplexTagHelpers.cshtml" WriteLiteral(true ? "checkbox" : "anything"); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Type = __tagHelperStringValueBuffer.GetContent(HtmlEncoder); __tagHelperExecutionContext.AddTagHelperAttribute("tYPe", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(492, 50, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(542, 18, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.StartTagOnly, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); StartTagHelperWritingScope(); #line 18 "ComplexTagHelpers.cshtml" if(true) { #line default #line hidden WriteLiteral("checkbox"); #line 18 "ComplexTagHelpers.cshtml" #line default #line hidden #line 18 "ComplexTagHelpers.cshtml" } else { #line default #line hidden WriteLiteral("anything"); #line 18 "ComplexTagHelpers.cshtml" #line default #line hidden #line 18 "ComplexTagHelpers.cshtml" } #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __InputTagHelper.Type = __tagHelperStringValueBuffer.GetContent(HtmlEncoder); __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(560, 79, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(641, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); #line 19 "ComplexTagHelpers.cshtml" } #line default #line hidden Instrumentation.BeginContext(658, 8, true); WriteLiteral(" "); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); AddHtmlAttributeValues("time", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 148), Tuple.Create("Current", 148), true), Tuple.Create(Tuple.Create(" ", 155), Tuple.Create("Time:", 156), true), Tuple.Create(Tuple.Create(" ", 161), Tuple.Create<System.Object, System.Int32>(DateTime.Now, 162), false)); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(139, 529, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(670, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(767, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); #line 22 "ComplexTagHelpers.cshtml" #line default #line hidden #line 22 "ComplexTagHelpers.cshtml" var @object = false; #line default #line hidden Instrumentation.BeginContext(807, 12, true); WriteLiteral(" "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.StartTagOnly, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); #line 23 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = (@object); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("ChecKED", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(819, 28, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(847, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw("first value")); #line 21 "ComplexTagHelpers.cshtml" __PTagHelper.Age = DateTimeOffset.Now.Year - 1970; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw("second value")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(680, 181, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(861, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(913, 14, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw("hello")); __tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw("world")); #line 26 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = (DateTimeOffset.Now.Year > 2014); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(927, 85, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(1012, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 25 "ComplexTagHelpers.cshtml" __PTagHelper.Age = -1970 + @DateTimeOffset.Now.Year; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(871, 155, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(1026, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(1076, 14, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.StartTagOnly, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); #line 29 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(1090, 48, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(1138, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 28 "ComplexTagHelpers.cshtml" __PTagHelper.Age = DateTimeOffset.Now.Year - 1970; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(1036, 116, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(1152, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(1204, 14, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); #line 32 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = @( DateTimeOffset.Now.Year ) > 2014 ; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(1218, 63, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(1281, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 31 "ComplexTagHelpers.cshtml" __PTagHelper.Age = ("My age is this long.".Length); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(1162, 133, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(1295, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); Instrumentation.BeginContext(1306, 11, false); #line 34 "ComplexTagHelpers.cshtml" Write(someMethod(item => new Template(async(__razor_template_writer) => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); #line 34 "ComplexTagHelpers.cshtml" __InputTagHelper2.Checked = checked; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(1345, 26, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 34 "ComplexTagHelpers.cshtml" __PTagHelper.Age = 123; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("hello")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(1318, 57, false); await WriteTagHelperToAsync(__razor_template_writer, __tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); #line 3 "TagHelpersInSection.cshtml" var code = "some code"; #line default #line hidden Instrumentation.BeginContext(69, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); DefineSection("MySection", async(__razor_template_writer) => { Instrumentation.BeginContext(93, 21, true); WriteLiteralTo(__razor_template_writer, "\r\n <div>\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("mytaghelper", false, "test", async() => { Instrumentation.BeginContext(217, 52, true); WriteLiteral("\r\n In None ContentBehavior.\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("nestedtaghelper", false, "test", async() => { Instrumentation.BeginContext(286, 26, true); WriteLiteral("Some buffered values with "); Instrumentation.EndContext(); Instrumentation.BeginContext(313, 4, false); #line 11 "TagHelpersInSection.cshtml" Write(code); #line default #line hidden Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __NestedTagHelper = CreateTagHelper<NestedTagHelper>(); __tagHelperExecutionContext.Add(__NestedTagHelper); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(269, 66, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(335, 10, true); WriteLiteral("\r\n "); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __MyTagHelper = CreateTagHelper<MyTagHelper>(); __tagHelperExecutionContext.Add(__MyTagHelper); StartTagHelperWritingScope(); WriteLiteral("Current Time: "); #line 9 "TagHelpersInSection.cshtml" WriteLiteral(DateTime.Now); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __MyTagHelper.BoundProperty = __tagHelperStringValueBuffer.ToString(); __tagHelperExecutionContext.AddTagHelperAttribute("boundproperty", __MyTagHelper.BoundProperty); StartTagHelperWritingScope(); WriteLiteral("Current Time: "); #line 9 "TagHelpersInSection.cshtml" Write(DateTime.Now); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __tagHelperExecutionContext.AddHtmlAttribute("unboundproperty", Html.Raw(__tagHelperStringValueBuffer.ToString())); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(114, 245, false); await WriteTagHelperToAsync(__razor_template_writer, __tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(359, 14, true); WriteLiteralTo(__razor_template_writer, "\r\n </div>\r\n"); Instrumentation.EndContext(); } ); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { BeginContext(120, 2, true); WriteLiteral("\r\n"); EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", "test", async() => { } , StartWritingScope, EndWritingScope); __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper <Microsoft.AspNet.Mvc.Razor.InputTestTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper); #line 5 "TestFiles/Input/ModelExpressionTagHelper.cshtml" __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For); __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag()); WriteLiteral(__tagHelperExecutionContext.Output.GeneratePreContent()); if (__tagHelperExecutionContext.Output.ContentSet) { WriteLiteral(__tagHelperExecutionContext.Output.GenerateContent()); } else if (__tagHelperExecutionContext.ChildContentRetrieved) { WriteLiteral(__tagHelperExecutionContext.GetChildContentAsync().Result); } else { __tagHelperExecutionContext.ExecuteChildContentAsync().Wait(); } WriteLiteral(__tagHelperExecutionContext.Output.GeneratePostContent()); WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag()); __tagHelperExecutionContext = __tagHelperScopeManager.End(); BeginContext(146, 2, true); WriteLiteral("\r\n"); EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", "test", async() => { } , StartWritingScope, EndWritingScope); __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper <Microsoft.AspNet.Mvc.Razor.InputTestTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper); #line 6 "TestFiles/Input/ModelExpressionTagHelper.cshtml" __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => Model); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For); __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result; WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag()); WriteLiteral(__tagHelperExecutionContext.Output.GeneratePreContent()); if (__tagHelperExecutionContext.Output.ContentSet) { WriteLiteral(__tagHelperExecutionContext.Output.GenerateContent()); } else if (__tagHelperExecutionContext.ChildContentRetrieved) { WriteLiteral(__tagHelperExecutionContext.GetChildContentAsync().Result); } else { __tagHelperExecutionContext.ExecuteChildContentAsync().Wait(); } WriteLiteral(__tagHelperExecutionContext.Output.GeneratePostContent()); WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag()); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(105, 11, true); WriteLiteral("Body of Tag"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("Hello World")); #line 6 "TagHelpersWithWeirdlySpacedAttributes.cshtml" __PTagHelper.Age = 1337; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); StartTagHelperWritingScope(); #line 7 "TagHelpersWithWeirdlySpacedAttributes.cshtml" Write(true); #line default #line hidden __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw(__tagHelperStringValueBuffer.GetContent(HtmlEncoder))); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(35, 85, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(120, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper.Type = "text"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw("hello")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(124, 47, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(171, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); #line 11 "TagHelpersWithWeirdlySpacedAttributes.cshtml" __PTagHelper.Age = 1234; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw("hello2")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(175, 46, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(221, 4, true); WriteLiteral("\r\n\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", TagMode.SelfClosing, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper.Type = "password"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2.Type = __InputTagHelper.Type; __tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw("blah")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(225, 51, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); #line 2 "TransitionsInTagHelperAttributes.cshtml" var @class = "container-fluid"; var @int = 1; #line default #line hidden Instrumentation.BeginContext(97, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { Instrumentation.BeginContext(128, 11, true); WriteLiteral("Body of Tag"); Instrumentation.EndContext(); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); AddHtmlAttributeValues("class", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 109), Tuple.Create<System.Object, System.Int32>(new Template((__razor_attribute_value_writer) => { } ), 109), false)); #line 7 "TransitionsInTagHelperAttributes.cshtml" __PTagHelper.Age = 1337; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(99, 44, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(143, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); AddHtmlAttributeValues("class", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 155), Tuple.Create<System.Object, System.Int32>(@class, 155), false)); #line 8 "TransitionsInTagHelperAttributes.cshtml" __PTagHelper.Age = 42; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(145, 34, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(179, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("test")); #line 9 "TransitionsInTagHelperAttributes.cshtml" __PTagHelper.Age = 42 + @int; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(181, 36, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(217, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("test")); #line 10 "TransitionsInTagHelperAttributes.cshtml" __PTagHelper.Age = int; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(219, 31, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(250, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("test")); #line 11 "TransitionsInTagHelperAttributes.cshtml" __PTagHelper.Age = (@int); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(252, 34, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(286, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", TagMode.StartTagAndEndTag, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); AddHtmlAttributeValues("class", __tagHelperExecutionContext, Tuple.Create(Tuple.Create("", 298), Tuple.Create("custom-", 298), true), Tuple.Create(Tuple.Create("", 305), Tuple.Create<System.Object, System.Int32>(@class, 305), false)); #line 12 "TransitionsInTagHelperAttributes.cshtml" __PTagHelper.Age = 4 * @(@int + 2); #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("age", __PTagHelper.Age); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); Instrumentation.BeginContext(288, 54, false); await WriteTagHelperAsync(__tagHelperExecutionContext); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(342, 2, true); WriteLiteral("\r\n"); Instrumentation.EndContext(); }
#pragma warning disable 1998 public override async Task ExecuteAsync() { __tagHelperRunner = __tagHelperRunner ?? new TagHelperRunner(); Instrumentation.BeginContext(33, 71, true); WriteLiteral("\r\n<div data-animation=\"fade\" class=\"randomNonTagHelperAttribute\">\r\n "); Instrumentation.EndContext(); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", false, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper.Type = "text"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; StartTagHelperWritingScope(); WriteLiteral("2000 + "); #line 6 "BasicTagHelpers.cshtml" Write(ViewBag.DefaultInterval); #line default #line hidden WriteLiteral(" + 1"); __tagHelperStringValueBuffer = EndTagHelperWritingScope(); __tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer.ToString())); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", true, "test", async() => { } , StartTagHelperWritingScope, EndTagHelperWritingScope); __InputTagHelper = CreateTagHelper<InputTagHelper>(); __tagHelperExecutionContext.Add(__InputTagHelper); __InputTagHelper.Type = "checkbox"; __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type); __InputTagHelper2 = CreateTagHelper<InputTagHelper2>(); __tagHelperExecutionContext.Add(__InputTagHelper2); __InputTagHelper2.Type = __InputTagHelper.Type; #line 7 "BasicTagHelpers.cshtml" __InputTagHelper2.Checked = true; #line default #line hidden __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); WriteLiteral("\r\n "); } , StartTagHelperWritingScope, EndTagHelperWritingScope); __PTagHelper = CreateTagHelper<PTagHelper>(); __tagHelperExecutionContext.Add(__PTagHelper); __tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw("Hello World")); __tagHelperExecutionContext.AddHtmlAttribute("data-delay", Html.Raw("1000")); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await WriteTagHelperAsync(__tagHelperExecutionContext); __tagHelperExecutionContext = __tagHelperScopeManager.End(); Instrumentation.BeginContext(304, 8, true); WriteLiteral("\r\n</div>"); Instrumentation.EndContext(); }