Beispiel #1
0
        //public static void TakeContent(this IReportDocument document)
        //{

        //    base.TakeContent();

        //    foreach (reportDocument doc in posts)
        //    {
        //        doc.TakeContent();
        //    }
        //}
        public static reportDocument AddChild(this IReportDocument parent, reportDocumentType postType, String title, ITextRender logger = null, String _bid = "")
        {
            reportDocument output = new reportDocument(postType)
            {
                Title = title,
                BID   = _bid.or(parent.BID),
            };

            if (parent is reportDocument parentReportDocument)
            {
                output.parent = parentReportDocument;
                if (logger != null)
                {
                    logger.AppendLine("New [" + postType.ToString() + "] [" + title + "] created under [" + parentReportDocument.Title + "]");
                }
            }


            parent.Children.Add(output);



            return(output);
        }
 public reportDocument(reportDocumentType postType)
 {
     PostType = postType;
 }