private void MigrateWeekTheotokions(TheotokionAppPlace source) { foreach (DayOfWeek day in Enum.GetValues(typeof(DayOfWeek))) { MigrateDayTheotokions(source, day); } }
public TheotokionApp Create(TheotokionAppPlace source, int ihos, DayOfWeek day, string stringDefinition) { return(new TheotokionApp() { Place = source, Ihos = ihos, DayOfWeek = day, Definition = stringDefinition }); }
/// <summary> /// Воскресные богородичны первого приложения /// </summary> private void MigrateDayTheotokions(TheotokionAppPlace source, DayOfWeek day) { AddTheotokionRequest request = new AddTheotokionRequest(); for (int ihos = 1; ihos <= 8; ihos++) { request.Theotokion = Factory.Create(source, ihos, day, FileReader.Read(source, ihos, day)); Service.Add(request); } }
public string Read(TheotokionAppPlace place, int ihos, DayOfWeek dayOfWeek) { string result = _fileReader.Read(string.Format("{0}.{1}.{2}", place, ihos, dayOfWeek)); if (string.IsNullOrEmpty(result)) { //создаем фейковый объект result = CreateFakeXml(place, ihos, dayOfWeek); } return(result); }
private string CreateFakeXml(TheotokionAppPlace place, int ihos, DayOfWeek dayOfWeek) { string text = string.Format("[{0}] [глас {1}] [{2}] Богородичен из Приложения Ирмология", place, ihos, dayOfWeek); Ymnos ymnos = new Ymnos(); ymnos.Text.AddOrUpdate(new ItemTextUnit() { Language = "cs-ru", Text = text }); return(new TypiconSerializer().Serialize(ymnos)); }
public TheotokionAppQuery(TheotokionAppPlace place, int ihos, DayOfWeek dayOfWeek) { Place = place; Ihos = ihos; DayOfWeek = dayOfWeek; }