Ejemplo 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(""));
            }
        }