public override string?Render() { Content = ChildNode?.Render(); Content = Content != null ? $"<h5{GetAttributes()}>{Content}</h5>" : $"<h5{GetAttributes()}></h5>"; return(Content + SiblingNode?.Render()); }
public override string?Render() { if (!IsChildAllowed(ChildNode?.GetType())) { throw new InvalidOperationException($"Child of type {ChildNode?.GetType()} is not allowed"); } Content = ChildNode?.Render(); Content = Content != null ? $"<html{GetAttributes()}>{Content}</html>" : $"<html{GetAttributes()}></html>"; return(Content); }
public override string?Render() { if (!IsChildAllowed(ChildNode?.GetType())) { throw new InvalidOperationException($"Child of type {ChildNode?.GetType()} is not allowed"); } if (!IsSiblingAllowed(SiblingNode?.GetType())) { throw new InvalidOperationException($"Sibling of type {SiblingNode?.GetType()} is not allowed"); } Content = ChildNode?.Render(); Content = Content != null ? $"<body>{Content}</body>" : "<body></body>"; return(Content); }