Exemplo n.º 1
0
        protected DomElement(  object[] content, object[] structure = null, string name = null , DomElementFlags flags = DomElementFlags.Default) :base("span") {
            Flags = flags;
            if (!string.IsNullOrWhiteSpace(name)) {
                Name = name;
            }
            else {
                Name = TagName;
            }
            if (null != structure) {
                Add((object[])structure);
            }
       
            if (null != content) {
                foreach (var item in content) {
                    Set(item);
                }
            }

            if (Flags.HasFlag(DomElementFlags.RequireValue) && string.IsNullOrEmpty(this.Value)) {
                this.Add(new XText(""));
            }
        }
Exemplo n.º 2
0
 protected NonContentElement(object[] content, object[] structure = null, string name = null, DomElementFlags flags = DomElementFlags.None) : base(content, structure, name, flags)
 {
 }
Exemplo n.º 3
0
 protected InBodyElement(object[] content, object[] structure = null, string name = null, DomElementFlags flags = DomElementFlags.None) : base(content, structure, name, flags ) {
 }
Exemplo n.º 4
0
 protected InHeadElement(object[] content, object[] structure = null, string name = null, DomElementFlags flags = DomElementFlags.Default) : base(content, structure, name, flags | DomElementFlags.PreferHead)
 {
 }
Exemplo n.º 5
0
 protected ContentElement(object[] content, object[] structure = null, string name = null, DomElementFlags flags = DomElementFlags.Default) : base(content, structure, name, flags) {
 }