Example #1
0
 static void PrintMagazine
 (
     [NotNull] PeriodInfo info
 )
 {
     _writer.WriteLine("<tr>");
     _writer.WriteLine("<td>");
     _writer.WriteLine(HtmlText.Encode(info.Title));
     _writer.WriteLine("</td>");
     _writer.WriteLine("<td>");
     _writer.WriteLine(HtmlText.Encode(info.Registered));
     _writer.WriteLine("</td>");
     _writer.WriteLine("</tr>");
 }
Example #2
0
        private static void ProcessMagazine
        (
            [NotNull] MagazineInfo magazine
        )
        {
            Console.WriteLine(magazine);
            MagazineIssueInfo[] issues = _manager.GetIssues(magazine, _year);

            List <string> registered = new List <string>(issues.Length);

            foreach (MagazineIssueInfo issue in issues)
            {
                ExemplarInfo[] exemplars = issue.Exemplars;
                if (!ReferenceEquals(exemplars, null))
                {
                    foreach (ExemplarInfo exemplar in exemplars)
                    {
                        string number = issue.Number;
                        if (!ReferenceEquals(number, null) &&
                            exemplar.KsuNumber1.SameString(_period))
                        {
                            registered.Add(issue.Number);
                            break;
                        }
                    }
                }
            }

            registered = NumberText.Sort(registered).Distinct().ToList();

            if (registered.Count == 0)
            {
                Console.WriteLine(Resources.T0, string.Empty);
            }
            else
            {
                PeriodInfo info = new PeriodInfo
                {
                    Title      = magazine.ExtendedTitle,
                    Registered = CompressIfPossible(registered)
                };
                _list.Add(info);
                Console.WriteLine(Resources.T0, info.Registered);
            }
        }