private void AppendText(CreateViewModelRequest <PsalmRule> req, BookReading psalmReading) { //List<string> paragraphs = psalmReading.Text.Select(c => c[req.Handler.Settings.Language.Name]).ToList(); var paragraphs = ParagraphVMFactory.CreateList(psalmReading.Text, req.Handler.Settings.Language.Name); req.AppendModelAction(new ElementViewModel() { ViewModelItemFactory.Create(TextHolderKind.Lector, paragraphs) }); }
public static ViewModelItem Create(TextHolder textHolder, IRuleHandler handler, IRuleSerializerRoot serializer) { var kind = Cast(textHolder.Kind); return(new ViewModelItem() { Kind = kind, KindStringValue = GetKindStringValue(kind, handler, serializer), Paragraphs = ParagraphVMFactory.CreateList(textHolder.Paragraphs, handler.Settings.Language.Name) }); }