示例#1
0
 internal void CaptureElementReference(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder, ref int n)
 {
     builder.AddElementReferenceCapture(n++, (__value) =>
     {
         this.element = __value;
     });
 }
示例#2
0
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "elem");
            __builder.AddElementReferenceCapture(1, (__value) => {
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
                myElem = __value;

#line default
#line hidden
#nullable disable
            }
示例#3
0
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "video");
            __builder.AddMultipleAttributes(1, Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck <global::System.Collections.Generic.IEnumerable <global::System.Collections.Generic.KeyValuePair <string, object> > >(
#nullable restore
#line 3 "D:\Development\Vidazor\src\Vidazor\VidazorVideo.razor"
                                                Attributes

#line default
#line hidden
#nullable disable
                                                ));
            __builder.AddElementReferenceCapture(2, (__value) => {
#nullable restore
#line 3 "D:\Development\Vidazor\src\Vidazor\VidazorVideo.razor"
                VideoElement = __value;

#line default
#line hidden
#nullable disable
            }
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "input");
            __builder.AddAttribute(1, "type", "text");
            __builder.AddAttribute(2, "data-slider-min",
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
                                   Min

#line default
#line hidden
#nullable disable
                                   );
            __builder.AddElementReferenceCapture(3, (__value) => {
#nullable restore
#line 1 "x:\dir\subdir\Test\TestComponent.cshtml"
                _element = __value;

#line default
#line hidden
#nullable disable
            }
示例#5
0
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder)
        {
            var clsList = new List <string>();

            if (Inline)
            {
                clsList.Add("el-form--inline");
            }
            switch (LabelAlign)
            {
            case LabelAlign.Left:
                clsList.Add("el-form--label-left");
                break;

            case LabelAlign.Right:
                clsList.Add("el-form--label-right");
                break;

            case LabelAlign.Top:
                clsList.Add("el-form--label-top");
                break;
            }
            clsList.Add("el-form");

            builder.OpenElement(0, "form");
            builder.AddAttribute(1, "class", string.Join(" ", clsList));
            builder.AddAttribute(2, "style", Style);
            builder.AddElementReferenceCapture(3, value => Container = value);
            TypeInference.CreateCascadingValue_0(builder, 4, 5, this, 6, (__builder2) =>
            {
                if (EntityType != null)
                {
                    if (formItemConfigs == null)
                    {
                        formItemConfigs = formFieldControlMap.GetFormItems(EntityType);
                    }
                    ChildContent = formItemsBuilder =>
                    {
                        foreach (var formItemConfig in formItemConfigs)
                        {
                            formItemConfig.Page = Page;
                            if (formItemConfig.Ignore)
                            {
                                continue;
                            }
                            formItemsBuilder.OpenComponent(1, formItemConfig.FormItem);
                            formItemsBuilder.AddAttribute(2, nameof(BFormItemObject.IsRequired), formItemConfig.IsRequired);
                            formItemsBuilder.AddAttribute(3, nameof(BFormItemObject.RequiredMessage), formItemConfig.RequiredMessage);
                            formItemsBuilder.AddAttribute(4, nameof(BFormItemObject.Label), formItemConfig.Label);
                            formItemsBuilder.AddAttribute(5, nameof(BFormItemObject.Image), formItemConfig.Image);
                            formItemsBuilder.AddAttribute(6, nameof(BFormItemObject.Name), formItemConfig.Name);
                            formItemsBuilder.AddAttribute(7, nameof(BFormItemObject.LabelWidth), formItemConfig.LabelWidth);
                            formItemsBuilder.AddAttribute(8, nameof(BFormItemObject.ChildContent), (RenderFragment)(inputControlBuilder =>
                            {
                                formItemConfig.InputControlRender.Render(inputControlBuilder, formItemConfig);
                            }
                                                                                                                    ));
                            formItemsBuilder.CloseComponent();
                        }
                        if (Buttons != null)
                        {
                            formItemsBuilder.OpenComponent <BFormActionItem>(11);
                            formItemsBuilder.AddAttribute(12, nameof(Style), "text-align:right");
                            formItemsBuilder.AddAttribute(13, nameof(BFormItemObject.ChildContent), Buttons);
                            formItemsBuilder.CloseComponent();
                        }
                    };
                }
                __builder2.AddContent(7, ChildContent);
            }
                                                 );
            builder.CloseElement();
        }
示例#6
0
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "div");
            __builder.AddAttribute(1, "class", "justify-content-center");
            __builder.AddMarkupContent(2, "\r\n    ");
            __builder.OpenElement(3, "label");
            __builder.AddContent(4,
#line 8 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
                                 Label

#line default
#line hidden
                                 );
            __builder.CloseElement();
            __builder.AddMarkupContent(5, "\r\n");
#line 9 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
            if (imagenBase64 != null)
            {
#line default
#line hidden
                __builder.AddContent(6, "        ");
                __builder.OpenElement(7, "div");
                __builder.AddMarkupContent(8, "\r\n            ");
                __builder.OpenElement(9, "div");
                __builder.AddAttribute(10, "style", "margin:10px;");
                __builder.AddMarkupContent(11, "\r\n                ");
                __builder.OpenElement(12, "img");
                __builder.AddAttribute(13, "src", "data:image/jpeg;base64," + " " + (
#line 13 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
                                           imagenBase64

#line default
#line hidden
                                           ));
                __builder.AddAttribute(14, "style", "width: 10vw; height:10vw; border-radius:50%;");
                __builder.CloseElement();
                __builder.AddMarkupContent(15, "\r\n            ");
                __builder.CloseElement();
                __builder.AddMarkupContent(16, "\r\n        ");
                __builder.CloseElement();
                __builder.AddMarkupContent(17, "\r\n");
#line 16 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
            }

#line default
#line hidden
#line 17 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
            if (ImagenTemporal != null)
            {
#line default
#line hidden
                __builder.AddContent(18, "        ");
                __builder.OpenElement(19, "div");
                __builder.AddMarkupContent(20, "\r\n            ");
                __builder.OpenElement(21, "div");
                __builder.AddAttribute(22, "style", "margin:10px;");
                __builder.AddMarkupContent(23, "\r\n                ");
                __builder.OpenElement(24, "img");
                __builder.AddAttribute(25, "src",
#line 21 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
                                       ImagenTemporal

#line default
#line hidden
                                       );
                __builder.AddAttribute(26, "style", "width: 10vw; height:10vw; border-radius:50%;");
                __builder.CloseElement();
                __builder.AddMarkupContent(27, "\r\n            ");
                __builder.CloseElement();
                __builder.AddMarkupContent(28, "\r\n        ");
                __builder.CloseElement();
                __builder.AddMarkupContent(29, "\r\n");
#line 24 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
            }

#line default
#line hidden
            __builder.CloseElement();
            __builder.AddMarkupContent(30, "\r\n");
            __builder.OpenElement(31, "div");
            __builder.AddMarkupContent(32, "\r\n\r\n    ");
            __builder.OpenElement(33, "div");
            __builder.AddMarkupContent(34, "\r\n        ");
            __builder.OpenElement(35, "input");
            __builder.AddAttribute(36, "type", "file");
            __builder.AddAttribute(37, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.Create <Microsoft.AspNetCore.Components.ChangeEventArgs>(this,
#line 29 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
                                                                                                                                                                  ImagenFileSelected

#line default
#line hidden
                                                                                                                                                                  ));
            __builder.AddAttribute(38, "Accept", ".jpg,.jpeg,.png,.jfif");
            __builder.AddElementReferenceCapture(39, (__value) => {
#line 29 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\InputImg.razor"
                inputElement = __value;

#line default
#line hidden
            }
                                                 );
            __builder.CloseElement();
            __builder.AddMarkupContent(40, "\r\n    ");
            __builder.CloseElement();
            __builder.AddMarkupContent(41, "\r\n");
            __builder.CloseElement();
        }
示例#7
0
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "div");
            __builder.AddAttribute(1, "class", "blazored-typeahead");
            __builder.AddElementReferenceCapture(2, (__value) => {
#line 6 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                typeahead = __value;

#line default
#line hidden
            }
                                                 );
            __builder.AddMarkupContent(3, "\r\n    ");
            __builder.OpenElement(4, "div");
            __builder.AddAttribute(5, "class", "blazored-typeahead__controls");
            __builder.AddMarkupContent(6, "\r\n        ");
            __builder.OpenElement(7, "input");
            __builder.AddAttribute(8, "class", "blazored-typeahead__input");
            __builder.AddAttribute(9, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create <Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
#line 12 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                                                                                                                                                                   ShowSuggestions

#line default
#line hidden
                                                                                                                                                                   ));
            __builder.AddAttribute(10, "type", "text");
            __builder.AddAttribute(11, "autocomplete", "off");
            __builder.AddAttribute(12, "placeholder",
#line 15 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                                   Placeholder

#line default
#line hidden
                                   );
            __builder.AddAttribute(13, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#line 10 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                                       SearchText

#line default
#line hidden
                                       ));
            __builder.AddAttribute(14, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => SearchText = __value, SearchText));
            __builder.SetUpdatesAttributeName("value");
            __builder.AddElementReferenceCapture(15, (__value) => {
#line 8 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                searchInput = __value;

#line default
#line hidden
            }
                                                 );
            __builder.CloseElement();
            __builder.AddMarkupContent(16, "\r\n    ");
            __builder.CloseElement();
            __builder.AddMarkupContent(17, "\r\n");
#line 17 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
            if (ShouldShowSuggestions())
            {
#line default
#line hidden
                __builder.OpenElement(18, "div");
                __builder.AddAttribute(19, "class", "blazored-typeahead__results");
                __builder.AddMarkupContent(20, "\r\n");
#line 20 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                foreach (var item in Suggestions)
                {
#line default
#line hidden
                    __builder.AddContent(21, "        ");
                    __builder.OpenElement(22, "div");
                    __builder.AddAttribute(23, "class", "blazored-typeahead__result" + " " + (
#line 22 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                                               GetSelectedSuggestionClass(item)

#line default
#line hidden
                                               ));
                    __builder.AddAttribute(24, "tabindex", "0");
                    __builder.AddAttribute(25, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create <Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
#line 22 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                                                                                                                                                                            () => SelectResult(item)

#line default
#line hidden
                                                                                                                                                                            ));
                    __builder.AddAttribute(26, "onkeyup", Microsoft.AspNetCore.Components.EventCallback.Factory.Create <Microsoft.AspNetCore.Components.Web.KeyboardEventArgs>(this,
#line 22 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                                                                                                                                                                               ((e) => HandleKeyUpOnSuggestion(e, item))

#line default
#line hidden
                                                                                                                                                                               ));
                    __builder.SetKey(
#line 22 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                        item

#line default
#line hidden
                        );
                    __builder.AddMarkupContent(27, "\r\n");
#line 23 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                    if (ResultTemplate != null)
                    {
#line default
#line hidden
                        __builder.AddContent(28,
#line 25 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                                             ResultTemplate(item)

#line default
#line hidden
                                             );
#line 25 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                    }

#line default
#line hidden
                    __builder.AddContent(29, "        ");
                    __builder.CloseElement();
                    __builder.AddMarkupContent(30, "\r\n");
#line 28 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                }

#line default
#line hidden
                __builder.CloseElement();
                __builder.AddMarkupContent(31, "\r\n");
#line 30 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
            }
            else if (ShowNotFound())
            {
#line default
#line hidden
                __builder.AddContent(32, "        ");
                __builder.OpenElement(33, "div");
                __builder.AddAttribute(34, "class", "blazored-typeahead__results");
                __builder.AddMarkupContent(35, "\r\n");
#line 34 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                if (NotFoundTemplate != null)
                {
#line default
#line hidden
                    __builder.AddContent(36, "                ");
                    __builder.OpenElement(37, "div");
                    __builder.AddAttribute(38, "class", "blazored-typeahead__notfound");
                    __builder.AddMarkupContent(39, "\r\n                    ");
                    __builder.AddContent(40,
#line 37 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                                         NotFoundTemplate

#line default
#line hidden
                                         );
                    __builder.AddMarkupContent(41, "\r\n                ");
                    __builder.CloseElement();
                    __builder.AddMarkupContent(42, "\r\n");
#line 39 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                }
                else
                {
#line default
#line hidden
                    __builder.AddContent(43, "                ");
                    __builder.AddMarkupContent(44, "<div class=\"blazored-typeahead__notfound\">\r\n                    No Results Found\r\n                </div>\r\n");
#line 45 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
                }

#line default
#line hidden
                __builder.AddContent(45, "        ");
                __builder.CloseElement();
                __builder.AddMarkupContent(46, "\r\n");
#line 47 "C:\Users\agust\source\repos\SurcosBlazor\Client\Shared\CustomTypeahead.razor"
            }

#line default
#line hidden
            __builder.CloseElement();
        }
示例#8
0
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "div");
            __builder.AddMarkupContent(1, "\r\n    ");
            __builder.OpenElement(2, "label");
            __builder.AddContent(3,
#line 6 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
                                 Label

#line default
#line hidden
                                 );
            __builder.CloseElement();
            __builder.AddMarkupContent(4, "\r\n    ");
            __builder.OpenElement(5, "div");
            __builder.AddMarkupContent(6, "\r\n        ");
            __builder.OpenElement(7, "input");
            __builder.AddAttribute(8, "type", "file");
            __builder.AddAttribute(9, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.Create <Microsoft.AspNetCore.Components.ChangeEventArgs>(this,
#line 8 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
                                                                                                                                                                 ImageFileSelected

#line default
#line hidden
                                                                                                                                                                 ));
            __builder.AddAttribute(10, "accept", ".jpg,.jpeg,.png");
            __builder.AddElementReferenceCapture(11, (__value) => {
#line 8 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
                inputElement = __value;

#line default
#line hidden
            }
                                                 );
            __builder.CloseElement();
            __builder.AddMarkupContent(12, "\r\n    ");
            __builder.CloseElement();
            __builder.AddMarkupContent(13, "\r\n");
            __builder.CloseElement();
            __builder.AddMarkupContent(14, "\r\n\r\n");
            __builder.OpenElement(15, "div");
            __builder.AddMarkupContent(16, "\r\n");
#line 13 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
            if (imageBase64 != null)
            {
#line default
#line hidden
                __builder.AddContent(17, "        ");
                __builder.OpenElement(18, "div");
                __builder.AddMarkupContent(19, "\r\n            ");
                __builder.OpenElement(20, "div");
                __builder.AddAttribute(21, "style", "margin:10px");
                __builder.AddMarkupContent(22, "\r\n                ");
                __builder.OpenElement(23, "img");
                __builder.AddAttribute(24, "src", "data:image/jpeg;base64," + " " + (
#line 17 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
                                           imageBase64

#line default
#line hidden
                                           ));
                __builder.AddAttribute(25, "style", "width:400px");
                __builder.CloseElement();
                __builder.AddMarkupContent(26, "\r\n            ");
                __builder.CloseElement();
                __builder.AddMarkupContent(27, "\r\n        ");
                __builder.CloseElement();
                __builder.AddMarkupContent(28, "\r\n");
#line 20 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
            }

#line default
#line hidden
            __builder.AddMarkupContent(29, "\r\n");
#line 22 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
            if (ImageUrl != null)
            {
#line default
#line hidden
                __builder.AddContent(30, "        ");
                __builder.OpenElement(31, "div");
                __builder.AddMarkupContent(32, "\r\n            ");
                __builder.OpenElement(33, "div");
                __builder.AddAttribute(34, "style", "margin:10px");
                __builder.AddMarkupContent(35, "\r\n                ");
                __builder.OpenElement(36, "img");
                __builder.AddAttribute(37, "src",
#line 26 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
                                       ImageUrl

#line default
#line hidden
                                       );
                __builder.AddAttribute(38, "style", "width:400px");
                __builder.CloseElement();
                __builder.AddMarkupContent(39, "\r\n            ");
                __builder.CloseElement();
                __builder.AddMarkupContent(40, "\r\n        ");
                __builder.CloseElement();
                __builder.AddMarkupContent(41, "\r\n");
#line 29 "C:\Users\Yorik\Desktop\Blazor_Movies\Movies_Blazor\Client\Shared\InputImage.razor"
            }

#line default
#line hidden
            __builder.CloseElement();
        }