Beispiel #1
0
        internal override void FinishAssembly()
        {
            base.EndAssembly();
            var mdrDumper = new MdrDumper(_initObject);
            var prgImp    = JSLangImp.GlobalObj.Main.Implementation;

            mdrDumper.Visit(prgImp);
            mdrDumper.Visit(JSLangImp.GlobalObj);
            _output.Write(@"
        static JSFunctionImp Init()
        {{
//Initializing objects
{0}
//Initializing code caches
{1}
return {2};
        }}
    }}
}}
", _initObject.ToString(), _initCache.ToString(), prgImp.FullName);

            _output.Flush();
            _output.Close();
            WriteBuilds(_filename);
        }
Beispiel #2
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
            Instrumentation.BeginContext(27, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
#line 3 "TagHelpersInSection.cshtml"

            var code = "some code";

#line default
#line hidden

            Instrumentation.BeginContext(63, 4, true);
            WriteLiteral("\r\n\r\n");
            Instrumentation.EndContext();
            DefineSection("MySection", async(__razor_template_writer) => {
                Instrumentation.BeginContext(87, 21, true);
                WriteLiteralTo(__razor_template_writer, "\r\n    <div>\r\n        ");
                Instrumentation.EndContext();
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("mytaghelper", "test", async() => {
                    WriteLiteral("\r\n            In None ContentBehavior.\r\n            ");
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("nestedtaghelper", "test", async() => {
                        WriteLiteral("Some buffered values with ");
#line 11 "TagHelpersInSection.cshtml"
                        Write(code);

#line default
#line hidden
                    }
                                                                                , StartWritingScope, EndWritingScope);
                    __NestedTagHelper = CreateTagHelper <NestedTagHelper>();
                    __tagHelperExecutionContext.Add(__NestedTagHelper);
                    __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();
                    WriteLiteral("\r\n        ");
                }
                                                                            , StartWritingScope, EndWritingScope);
                __MyTagHelper = CreateTagHelper <MyTagHelper>();
                __tagHelperExecutionContext.Add(__MyTagHelper);
                StartWritingScope();
                WriteLiteral("Current Time: ");
#line 9 "TagHelpersInSection.cshtml"
                Write(DateTime.Now);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWritingScope();
                __MyTagHelper.BoundProperty  = __tagHelperStringValueBuffer.ToString();
                __tagHelperExecutionContext.AddTagHelperAttribute("BoundProperty", __MyTagHelper.BoundProperty);
                StartWritingScope();
                WriteLiteral("Current Time: ");
#line 9 "TagHelpersInSection.cshtml"
                Write(DateTime.Now);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWritingScope();
                __tagHelperExecutionContext.AddHtmlAttribute("unboundproperty", __tagHelperStringValueBuffer.ToString());
                __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
                WriteLiteralTo(__razor_template_writer, __tagHelperExecutionContext.Output.GenerateStartTag());
                WriteLiteralTo(__razor_template_writer, __tagHelperExecutionContext.Output.GeneratePreContent());
                if (__tagHelperExecutionContext.Output.ContentSet)
                {
                    WriteLiteralTo(__razor_template_writer, __tagHelperExecutionContext.Output.GenerateContent());
                }
                else if (__tagHelperExecutionContext.ChildContentRetrieved)
                {
                    WriteLiteralTo(__razor_template_writer, __tagHelperExecutionContext.GetChildContentAsync().Result);
                }
                else
                {
                    StartWritingScope(__razor_template_writer);
                    __tagHelperExecutionContext.ExecuteChildContentAsync().Wait();
                    EndWritingScope();
                }
                WriteLiteralTo(__razor_template_writer, __tagHelperExecutionContext.Output.GeneratePostContent());
                WriteLiteralTo(__razor_template_writer, __tagHelperExecutionContext.Output.GenerateEndTag());
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                Instrumentation.BeginContext(353, 14, true);
                WriteLiteralTo(__razor_template_writer, "\r\n    </div>\r\n");
                Instrumentation.EndContext();
            }
                          );
        }
Beispiel #3
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
            Instrumentation.BeginContext(27, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
#line 3 "ComplexTagHelpers.cshtml"
            if (true)
            {
                var checkbox = "checkbox";


#line default
#line hidden

                Instrumentation.BeginContext(78, 55, true);
                WriteLiteral("    <div class=\"randomNonTagHelperAttribute\">\r\n        ");
                Instrumentation.EndContext();
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", "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", "test", async() => {
                            WriteLiteral("New Time: ");
                            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", "test", async() => {
                            }
                                                                                        , StartWritingScope, EndWritingScope);
                            __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", "");
                            __tagHelperExecutionContext.AddHtmlAttribute("placeholder", "Enter in a new time...");
                            __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();
                        }
                                                                                    , StartWritingScope, EndWritingScope);
                        __PTagHelper = CreateTagHelper <PTagHelper>();
                        __tagHelperExecutionContext.Add(__PTagHelper);
                        __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();
                        WriteLiteral("\r\n");
#line 13 "ComplexTagHelpers.cshtml"
                    }
                    else
                    {
#line default
#line hidden

                        WriteLiteral("                ");
                        __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", "test", async() => {
                            WriteLiteral("Current Time: ");
                            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", "test", async() => {
                            }
                                                                                        , StartWritingScope, EndWritingScope);
                            __InputTagHelper = CreateTagHelper <InputTagHelper>();
                            __tagHelperExecutionContext.Add(__InputTagHelper);
                            StartWritingScope();
#line 16 "ComplexTagHelpers.cshtml"
                            Write(checkbox);

#line default
#line hidden
                            __tagHelperStringValueBuffer = EndWritingScope();
                            __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 = __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();
                        }
                                                                                    , StartWritingScope, EndWritingScope);
                        __PTagHelper = CreateTagHelper <PTagHelper>();
                        __tagHelperExecutionContext.Add(__PTagHelper);
                        __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();
                        WriteLiteral("\r\n                ");
                        __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", "test", async() => {
                        }
                                                                                    , StartWritingScope, EndWritingScope);
                        __InputTagHelper = CreateTagHelper <InputTagHelper>();
                        __tagHelperExecutionContext.Add(__InputTagHelper);
                        StartWritingScope();
#line 17 "ComplexTagHelpers.cshtml"
                        Write(true ? "checkbox" : "anything");

#line default
#line hidden
                        __tagHelperStringValueBuffer = EndWritingScope();
                        __InputTagHelper.Type        = __tagHelperStringValueBuffer.ToString();
                        __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type);
                        __InputTagHelper2 = CreateTagHelper <InputTagHelper2>();
                        __tagHelperExecutionContext.Add(__InputTagHelper2);
                        __InputTagHelper2.Type             = __InputTagHelper.Type;
                        __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();
                        WriteLiteral("\r\n                ");
                        __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", "test", async() => {
                        }
                                                                                    , StartWritingScope, EndWritingScope);
                        __InputTagHelper = CreateTagHelper <InputTagHelper>();
                        __tagHelperExecutionContext.Add(__InputTagHelper);
                        StartWritingScope();
#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 = EndWritingScope();
                        __InputTagHelper.Type        = __tagHelperStringValueBuffer.ToString();
                        __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type);
                        __InputTagHelper2 = CreateTagHelper <InputTagHelper2>();
                        __tagHelperExecutionContext.Add(__InputTagHelper2);
                        __InputTagHelper2.Type             = __InputTagHelper.Type;
                        __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();
                        WriteLiteral("\r\n");
#line 19 "ComplexTagHelpers.cshtml"
                    }

#line default
#line hidden

                    WriteLiteral("        ");
                }
                                                                            , StartWritingScope, EndWritingScope);
                __PTagHelper = CreateTagHelper <PTagHelper>();
                __tagHelperExecutionContext.Add(__PTagHelper);
                StartWritingScope();
                WriteLiteral("Current Time: ");
#line 8 "ComplexTagHelpers.cshtml"
                Write(DateTime.Now);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWritingScope();
                __tagHelperExecutionContext.AddHtmlAttribute("time", __tagHelperStringValueBuffer.ToString());
                __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();
                Instrumentation.BeginContext(666, 10, true);
                WriteLiteral("\r\n        ");
                Instrumentation.EndContext();
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", "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", "test", async() => {
                    }
                                                                                , StartWritingScope, EndWritingScope);
                    __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 = __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();
                    WriteLiteral("\r\n        ");
                }
                                                                            , StartWritingScope, EndWritingScope);
                __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 = __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();
                Instrumentation.BeginContext(813, 10, true);
                WriteLiteral("\r\n        ");
                Instrumentation.EndContext();
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", "test", async() => {
                    WriteLiteral("\r\n            ");
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", "test", async() => {
                    }
                                                                                , StartWritingScope, EndWritingScope);
                    __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 = __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();
                    WriteLiteral("\r\n        ");
                }
                                                                            , StartWritingScope, EndWritingScope);
                __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 = __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();
                Instrumentation.BeginContext(946, 10, true);
                WriteLiteral("\r\n        ");
                Instrumentation.EndContext();
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", "test", async() => {
                    WriteLiteral("\r\n            ");
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", "test", async() => {
                    }
                                                                                , StartWritingScope, EndWritingScope);
                    __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 = __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();
                    WriteLiteral("\r\n        ");
                }
                                                                            , StartWritingScope, EndWritingScope);
                __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 = __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();
                Instrumentation.BeginContext(1074, 10, true);
                WriteLiteral("\r\n        ");
                Instrumentation.EndContext();
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p", "test", async() => {
                    WriteLiteral("\r\n            ");
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", "test", async() => {
                    }
                                                                                , StartWritingScope, EndWritingScope);
                    __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 = __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();
                    WriteLiteral("\r\n        ");
                }
                                                                            , StartWritingScope, EndWritingScope);
                __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 = __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();
                Instrumentation.BeginContext(1217, 14, true);
                WriteLiteral("\r\n    </div>\r\n");
                Instrumentation.EndContext();
#line 35 "ComplexTagHelpers.cshtml"
            }

#line default
#line hidden
        }
Beispiel #4
0
        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
            Instrumentation.BeginContext(27, 2, true);
            WriteLiteral("\r\n");
            Instrumentation.EndContext();
#line 3 "ComplexTagHelpers.cshtml"
            if (true)
            {
                var checkbox = "checkbox";


#line default
#line hidden

                Instrumentation.BeginContext(78, 55, true);
                WriteLiteral("    <div class=\"randomNonTagHelperAttribute\">\r\n        ");
                Instrumentation.EndContext();
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p");
                __PTagHelper = CreateTagHelper <PTagHelper>();
                __tagHelperExecutionContext.Add(__PTagHelper);
                StartWritingScope();
                WriteLiteral("Current Time: ");
#line 8 "ComplexTagHelpers.cshtml"
                Write(DateTime.Now);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWritingScope();
                __tagHelperExecutionContext.AddHtmlAttribute("time", __tagHelperStringValueBuffer.ToString());
                __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
                WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag());
                Instrumentation.BeginContext(171, 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(245, 16, true);
                    WriteLiteral("                ");
                    Instrumentation.EndContext();
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p");
                    __PTagHelper = CreateTagHelper <PTagHelper>();
                    __tagHelperExecutionContext.Add(__PTagHelper);
                    __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag());
                    Instrumentation.BeginContext(264, 10, true);
                    WriteLiteral("New Time: ");
                    Instrumentation.EndContext();
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input");
                    __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", "");
                    __tagHelperExecutionContext.AddHtmlAttribute("placeholder", "Enter in a new time...");
                    __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag());
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag());
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag());
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    Instrumentation.BeginContext(344, 2, true);
                    WriteLiteral("\r\n");
                    Instrumentation.EndContext();
#line 13 "ComplexTagHelpers.cshtml"
                }
                else
                {
#line default
#line hidden

                    Instrumentation.BeginContext(394, 16, true);
                    WriteLiteral("                ");
                    Instrumentation.EndContext();
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("p");
                    __PTagHelper = CreateTagHelper <PTagHelper>();
                    __tagHelperExecutionContext.Add(__PTagHelper);
                    __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag());
                    Instrumentation.BeginContext(413, 14, true);
                    WriteLiteral("Current Time: ");
                    Instrumentation.EndContext();
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input");
                    __InputTagHelper            = CreateTagHelper <InputTagHelper>();
                    __tagHelperExecutionContext.Add(__InputTagHelper);
                    StartWritingScope();
#line 16 "ComplexTagHelpers.cshtml"
                    Write(checkbox);

#line default
#line hidden
                    __tagHelperStringValueBuffer = EndWritingScope();
                    __InputTagHelper.Type        = __tagHelperStringValueBuffer.ToString();
                    __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type);
                    __InputTagHelper2 = CreateTagHelper <InputTagHelper2>();
                    __tagHelperExecutionContext.Add(__InputTagHelper2);
                    __InputTagHelper2.Type    = __InputTagHelper.Type;
                    __InputTagHelper2.Checked = true;
                    __tagHelperExecutionContext.AddTagHelperAttribute("checked", __InputTagHelper2.Checked);
                    __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag());
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag());
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag());
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    Instrumentation.BeginContext(468, 18, true);
                    WriteLiteral("\r\n                ");
                    Instrumentation.EndContext();
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input");
                    __InputTagHelper            = CreateTagHelper <InputTagHelper>();
                    __tagHelperExecutionContext.Add(__InputTagHelper);
                    StartWritingScope();
#line 17 "ComplexTagHelpers.cshtml"
                    Write(true ? "checkbox" : "anything");

#line default
#line hidden
                    __tagHelperStringValueBuffer = EndWritingScope();
                    __InputTagHelper.Type        = __tagHelperStringValueBuffer.ToString();
                    __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type);
                    __InputTagHelper2 = CreateTagHelper <InputTagHelper2>();
                    __tagHelperExecutionContext.Add(__InputTagHelper2);
                    __InputTagHelper2.Type             = __InputTagHelper.Type;
                    __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag());
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag());
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    Instrumentation.BeginContext(536, 18, true);
                    WriteLiteral("\r\n                ");
                    Instrumentation.EndContext();
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input");
                    __InputTagHelper            = CreateTagHelper <InputTagHelper>();
                    __tagHelperExecutionContext.Add(__InputTagHelper);
                    StartWritingScope();
#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 = EndWritingScope();
                    __InputTagHelper.Type        = __tagHelperStringValueBuffer.ToString();
                    __tagHelperExecutionContext.AddTagHelperAttribute("type", __InputTagHelper.Type);
                    __InputTagHelper2 = CreateTagHelper <InputTagHelper2>();
                    __tagHelperExecutionContext.Add(__InputTagHelper2);
                    __InputTagHelper2.Type             = __InputTagHelper.Type;
                    __tagHelperExecutionContext.Output = __tagHelperRunner.RunAsync(__tagHelperExecutionContext).Result;
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateStartTag());
                    WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag());
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    Instrumentation.BeginContext(637, 2, true);
                    WriteLiteral("\r\n");
                    Instrumentation.EndContext();
#line 19 "ComplexTagHelpers.cshtml"
                }

#line default
#line hidden

                Instrumentation.BeginContext(654, 8, true);
                WriteLiteral("        ");
                Instrumentation.EndContext();
                WriteLiteral(__tagHelperExecutionContext.Output.GenerateEndTag());
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                Instrumentation.BeginContext(666, 14, true);
                WriteLiteral("\r\n    </div>\r\n");
                Instrumentation.EndContext();
#line 22 "ComplexTagHelpers.cshtml"
            }

#line default
#line hidden
        }