Exemplo n.º 1
0
 public NamespaceInput()
 {
     NamespaceTargetLocations = new List <NamespaceTargetLocationInput>();
     QueueTargetLocations     = new List <QueueTargetLocationInput>();
     Queues = new List <QueueInput>();
     Tags   = new TagOutput();
 }
Exemplo n.º 2
0
        public async override Task ProcessAsync()
        {
            var content = await TagOutput.GetChildContentAsync();

            TagOutput.Content.SetHtmlContent(content);

            if (InputType == InputTypes.Checkbox)
            {
                PreContent.SetHtmlContent(new HtmlString("<label for=\"" + EncodeAttribute(InputID) + "\">"));
                PostContent.SetHtmlContent(new HtmlString(EncodeHTML(Label) + "</label>"));
                TagName = "div";
                this.AddClass("checkbox");
            }
            else
            {
                if (Label != null)
                {
                    PreElement.SetHtmlContent(new HtmlString("<label for=\"" + EncodeAttribute(InputID) + "\">" + Label + "</label>"));
                }
            }

            if (HelpMessage != null)
            {
                PostElement.SetHtmlContent(new HtmlString("<small id=\"" + EncodeAttribute(InputID) + "Help\" class=\"form-text text-muted\">" + HelpMessage + "</small>"));
            }
        }
Exemplo n.º 3
0
        // --------------------------------------------------------------------------------------------------------------------

        /// <summary> Asynchronously processes the component and renders output. </summary>
        /// <returns> An asynchronous result. </returns>
        /// <seealso cref="M:CoreXT.Toolkit.TagComponents.TagComponent.ProcessAsync()"/>
        public async override Task ProcessAsync()
        {
            var context = await ProcessContent() ? (IHtmlContent)TagOutput : await TagOutput.GetChildContentAsync();

            TagContext.Items.TryGetValue(typeof(Menu), out var menu);
            TagContext.Items.TryGetValue(typeof(MenuDropdown), out var menuDropdown);

            if (menu != null)
            {
                ((Menu)menu).Items.Add(context.Render());
                TagOutput.SuppressOutput(); // (this will be processed by the parent modal tag component)
            }
            else if (menuDropdown != null)
            {
                ((MenuDropdown)menuDropdown).Items.Add(context.Render());
                TagOutput.SuppressOutput(); // (this will be processed by the parent modal tag component)
            }
            else
            {
                TagOutput.Content.SetHtmlContent(context);
            }
        }
Exemplo n.º 4
0
 public QueueObjectValueOutput()
 {
     QueueProperties = new QueuePropertiesOutput();
     Tags            = new TagOutput();
 }
 public NamespaceObjectValueOutput()
 {
     Tags = new TagOutput();
 }