public static void AddWorship(this OutputDay day, OutputWorshipModel worshipModel, ITypiconSerializer typiconSerializer)
        {
            var w = new OutputWorship()
            {
                OutputDay      = day,
                Order          = day.GetMaxOrder() + 1,
                Time           = worshipModel.Time,
                Name           = new ItemTextStyled(worshipModel.Name),
                AdditionalName = (worshipModel.AdditionalName != null)
                    ? new ItemTextStyled(worshipModel.AdditionalName)
                    : new ItemTextStyled(),
                Definition = (worshipModel.ChildElements.Any())
                    ? typiconSerializer.Serialize(worshipModel.ChildElements)
                    : string.Empty
            };

            day.Worships.Add(w);
        }
        public string Execute(int typiconId, FilteredOutputWeek week)
        {
            //находим путь к файлу xslt
            var xsltFilePath = configRepo.GetConfigurationValue(XSLT_CONFIG);

            var xslt = new XslCompiledTransform();

            xslt.Load(xsltFilePath);

            //получаем xml-строку
            var xml = xmlSerializer.Serialize(week);

            var xmlreader = XmlReader.Create(new StringReader(xml));

            var stringWriter = new StringWriter();
            var xmlWriter    = XmlWriter.Create(stringWriter);

            //выполняем xslt-трансформацию
            xslt.Transform(xmlreader, xmlWriter);

            return(stringWriter.ToString());
        }