Esempio n. 1
0
        public static NewsBlock CreateNewsBlock(string title, List <NewsContent> newsContents = null)
        {
            var newsBlock = new NewsBlock(title);

            newsBlock.Set(NewsBlock.PropertyAccessExpressions.NewsContents, newsContents);

            return(newsBlock);
        }
Esempio n. 2
0
        public static NewsBlock CreateNewsBlock(string title, params string[] details)
        {
            var newsContents = details.Select((detail, i) => CreateNewsContent(i + 1, detail)).ToList();

            var newsBlock = new NewsBlock(title);

            newsBlock.Set(NewsBlock.PropertyAccessExpressions.NewsContents, newsContents);

            return(newsBlock);
        }