public CoeveryTagBuilder Create(dynamic shape, string tagName)
 {
     var tagBuilder = new CoeveryTagBuilder(tagName);
     tagBuilder.MergeAttributes(shape.Attributes, false);
     foreach (var cssClass in shape.Classes ?? Enumerable.Empty<string>())
         tagBuilder.AddCssClass(cssClass);
     if (!string.IsNullOrEmpty(shape.Id))
         tagBuilder.GenerateId(shape.Id);
     return tagBuilder;
 }
Exemple #2
0
        public CoeveryTagBuilder Create(dynamic shape, string tagName)
        {
            var tagBuilder = new CoeveryTagBuilder(tagName);

            tagBuilder.MergeAttributes(shape.Attributes, false);
            foreach (var cssClass in shape.Classes ?? Enumerable.Empty <string>())
            {
                tagBuilder.AddCssClass(cssClass);
            }
            if (!string.IsNullOrEmpty(shape.Id))
            {
                tagBuilder.GenerateId(shape.Id);
            }
            return(tagBuilder);
        }