示例#1
0
        public Message CreateNews(string headline, IList <string> lines)
        {
            var h = new Headline(headline);

            var news = new News(h);

            foreach (var s in lines)
            {
                var group = new News.LinesOfTextGroup {
                    Text = new Text(s)
                };
                news.AddGroup(group);
            }

            if (lines.Count == 0)
            {
                var noLines = new LinesOfText(0);
                news.SetField(noLines, true);
            }

            return(news);
        }
示例#2
0
        public Message CreateNews(string headline, IList<string> lines)
        {
            var h = new Headline(headline);

            var news = new News(h);
            foreach (var s in lines)
            {
                var group = new News.LinesOfTextGroup {Text = new Text(s)};
                news.AddGroup(group);
            }

            if (lines.Count == 0)
            {
                var noLines = new LinesOfText(0);
                news.SetField(noLines, true);
            }

            return news;
        }