示例#1
0
        public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
        {
            var contentModel = context.GetItem <ModalTagHelper, IBasicContext>();

            contentModel.Footer = await GetContentAsync(context, output);

            output.SuppressOutput();
        }
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            var contentModel = context.GetItem <DropdownTagHelper, IMultipleItemsContext>();
            var seperator    = @"<li role=""separator"" class=""divider""></li>";

            contentModel.Items.Add(seperator);
            output.SuppressOutput();
        }
示例#3
0
        public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
        {
            var itemTemplate = @"<li class=""list-group-item"">{0}</li>";
            var contentModel = context.GetItem <ListGroupTagHelper, IMultipleItemsContext>();

            contentModel.Items.Add(await GetContentAsync(context, output, itemTemplate));
            output.SuppressOutput();
        }
示例#4
0
        public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
        {
            var template     = @"<li>{0}</li>";
            var contentModel = context.GetItem <DropdownTagHelper, IMultipleItemsContext>();

            contentModel.Items.Add(await GetContentAsync(context, output, template));
            output.SuppressOutput();
        }
示例#5
0
        public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
        {
            var template     = @"<button class=""btn [addOn] dropdown-toggle"" type=""button"" 
                                     data-toggle=""dropdown"" aria-haspopup=""true"" 
                                     aria-expanded=""true"">
                               {0}
                               <span class=""caret""></span>
                             </button>";
            var contentModel = context.GetItem <DropdownTagHelper, IMultipleItemsContext>();

            contentModel.Header = await GetContentAsync(context, output, template);

            output.SuppressOutput();
        }
示例#6
0
 public static ICollection <string> GetInnerScripts(this TagHelperContext context)
 {
     return(context.GetItem <ICollection <string> >(INNER_SCRIPTS_KEY));
 }
示例#7
0
 public static string GetParentFullKey(this TagHelperContext context)
 {
     return(context.GetItem <string>(PARENT_FULLKEY_KEY));
 }
示例#8
0
 public static IDictionary <string, object> GetParentConfig(this TagHelperContext context)
 {
     return(context.GetItem <IDictionary <string, object> >(PARENT_CONFIG_KEY));
 }