Esempio n. 1
0
        public override string?Render()
        {
            Content = ChildNode?.Render();
            Content = Content != null ? $"<h5{GetAttributes()}>{Content}</h5>" : $"<h5{GetAttributes()}></h5>";

            return(Content + SiblingNode?.Render());
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }