示例#1
0
 protected internal TagBase(string name, TagOptions options, object[] content) : this(name, options)
 {
     if (content?.Length > 0)
     {
         TagChildren.Replace(content);
     }
 }
示例#2
0
 protected internal TagBase(string name, object content, TagOptions options = null)
     : this(name, options)
 {
     if (content != null)
     {
         TagChildren.Replace(content);
     }
 }
示例#3
0
 public Tag(string name, object content, TagOptions options = null)
     : this(name, options)
 {
     if (content != null)
     {
         TagChildren.Replace(content);
     }
 }
示例#4
0
文件: Tag.T.cs 项目: 2sic/razor-blade
        /// <summary>
        /// Wrap the tag around the new content, so this replaces all the content with what you give it
        /// </summary>

        /// <param name="content">a variable amount of tags / strings to add to the contents of this tag</param>
        /// <returns></returns>
        public T Wrap(params object[] content)
        {
            TagChildren.Replace(content);
            return(this as T);
        }
示例#5
0
文件: Tag.T.cs 项目: 2sic/razor-blade
        /// <summary>
        /// Wrap the tag around the new content, so this replaces all the content with what you give it
        /// </summary>

        /// <param name="content">New content - can be a string, TagBase or list of tags</param>
        /// <returns></returns>
        public T Wrap(object content)
        {
            TagChildren.Replace(content);
            return(this as T);
        }