Exemple #1
0
 public static FilteredOutputDayHeader FilterOut(this OutputDayHeader header, OutputFilter filter)
 => new FilteredOutputDayHeader()
 {
     Name       = header.Name.FilterOut(filter),
     SignName   = header.PrintDayTemplate.Name,
     SignNumber = header.PrintDayTemplate.Number,
     Icon       = header.PrintDayTemplate.Icon,
     IsRed      = header.PrintDayTemplate.IsRed,
 };
Exemple #2
0
 public static FilteredOutputWorship FilterOut(this OutputWorship worship, OutputFilter filter)
 => new FilteredOutputWorship
 {
     Id             = worship.Id,
     Time           = worship.Time,
     Name           = worship.Name?.FilterOut(filter),
     AdditionalName = worship.AdditionalName?.FilterOut(filter),
     HasSequence    = !string.IsNullOrEmpty(worship.Definition),
     ModifiedDate   = worship.ModifiedDate
 };
Exemple #3
0
 public static FilteredOutputDay FilterOut(this OutputDay day, OutputFilter filter)
 => new FilteredOutputDay()
 {
     Id       = day.Id,
     Date     = day.Date,
     Header   = day.Header?.FilterOut(filter),
     Worships = day.Worships
                .OrderBy(c => c.Order)
                .ToList()
                .FilterOut(filter),
     ModifiedDate = day.ModifiedDate
 };
Exemple #4
0
 public static FilteredParagraph FilterOut(this ItemTextStyled item, OutputFilter filter)
 {
     return(new FilteredParagraph
     {
         Text = (item as ItemText).FilterOut(filter),
         Style = new TextStyle()
         {
             IsBold = item.IsBold,
             IsItalic = item.IsItalic,
             IsRed = item.IsRed
         }
     });
 }
Exemple #5
0
 public static FilteredParagraphNoted FilterOut(this ItemTextNoted item, OutputFilter filter)
 {
     return(new FilteredParagraphNoted
     {
         Text = (item as ItemText).FilterOut(filter),
         Style = new TextStyle()
         {
             Header = item.Header,
             IsBold = item.IsBold,
             IsItalic = item.IsItalic,
             IsRed = item.IsRed
         },
         Note = item.Note?.FilterOut(filter)
     });
 }
Exemple #6
0
        public static List <FilteredOutputDay> FilterOut(this List <OutputDay> collection, OutputFilter filter)
        {
            var result = new List <FilteredOutputDay>();

            collection.ForEach(c => result.Add(c.FilterOut(filter)));
            return(result);
        }
Exemple #7
0
        public static List <FilteredParagraphNoted> FilterOut(this List <ItemTextNoted> collection, OutputFilter filter)
        {
            var result = new List <FilteredParagraphNoted>();

            collection.ForEach(c => result.Add(c.FilterOut(filter)));
            return(result);
        }
Exemple #8
0
 public static FilteredOutputSection FilterOut(this OutputSectionModel section, OutputFilter filter)
 => new FilteredOutputSection()
 {
     KindText   = section.KindText?.FilterOut(filter),
     Kind       = section.Kind,
     Paragraphs = section.Paragraphs.FilterOut(filter)
 };
Exemple #9
0
        /// <summary>
        /// Оставляем только элемент с указанным языком, либо любой первый, если указанного нет
        /// </summary>
        /// <param name="filter.Language"></param>
        public static ItemTextUnit FilterOut(this ItemText item, OutputFilter filter)
        {
            var found = item.FirstOrDefault(filter.Language);

            return((found != null) ? new ItemTextUnit(found.Language, found.Text) : default(ItemTextUnit));
        }