示例#1
0
 protected override void ThrowOnInvalidChildElement(TextElement child)
 {
     base.ThrowOnInvalidChildElement(child);
     throw new ArgumentException("Run can't have child elements");
 }
示例#2
0
        protected override void ThrowOnInvalidChildElement(TextElement child)
        {
            base.ThrowOnInvalidChildElement(child);

            throw new ArgumentException("LineBreak can't have any childs");
        }
示例#3
0
        protected override void ThrowOnInvalidChildElement(TextElement child)
        {
            base.ThrowOnInvalidChildElement(child);

            ThrowIfChildIsNoneOfThisTypes(child, typeof(ListItem));
        }
示例#4
0
 /// <summary>
 /// Appends a child to this element.
 /// </summary>
 /// <param name="child">The child to append.</param>
 public virtual void AppendChild(TextElement child)
 {
     ThrowOnInvalidChildElement(child);
     child.Parent = this;
     _childs.Add(child);
 }
示例#5
0
 protected override void ThrowOnInvalidChildElement(TextElement child)
 {
     base.ThrowOnInvalidChildElement(child);
     ThrowIfChildIsNoneOfThisTypes(child, typeof(BlockUIContainer), typeof(List), typeof(Paragraph), typeof(Section), typeof(Table));
 }
示例#6
0
 protected override void ThrowOnInvalidChildElement(TextElement child)
 {
     base.ThrowOnInvalidChildElement(child);
     throw new ArgumentException("Image can't have any childs", nameof(child));
 }