public NamespaceInput() { NamespaceTargetLocations = new List <NamespaceTargetLocationInput>(); QueueTargetLocations = new List <QueueTargetLocationInput>(); Queues = new List <QueueInput>(); Tags = new TagOutput(); }
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>")); } }
// -------------------------------------------------------------------------------------------------------------------- /// <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); } }
public QueueObjectValueOutput() { QueueProperties = new QueuePropertiesOutput(); Tags = new TagOutput(); }
public NamespaceObjectValueOutput() { Tags = new TagOutput(); }