public BookStorage Create() { var easters = new EasterContext(_unitOfWork); return(new BookStorage(new EvangelionContext(_unitOfWork), new ApostolContext(_unitOfWork), new OldTestamentContext(_unitOfWork), new PsalterContext(_unitOfWork), new OktoikhContext(_unitOfWork, easters), new TheotokionAppContext(_unitOfWork), new EasterContext(_unitOfWork), new KatavasiaContext(_unitOfWork))); }
private void MigrateOktoikh() { string folder = Path.Combine(FOLDER_PATH, @"Books\Oktoikh"); IOktoikhDayFileReader reader = new OktoikhDayFileReader(new FileReader(folder)); IEasterContext easterContext = new EasterContext(_unitOfWork); IOktoikhDayService service = new OktoikhDayService(_unitOfWork, easterContext); IOktoikhDayFactory factory = new OktoikhDayFactory(); IMigrationManager manager = new OktoikhDayMigrationManager(factory, reader, service); manager.Import(); }
private void MigrateOktoikh() { string folder = Path.Combine(Properties.Settings.Default.FolderPath, @"Books\Oktoikh"); IOktoikhDayFileReader reader = new OktoikhDayFileReader(new FileReader(folder)); IEasterContext easterContext = new EasterContext(_unitOfWork); IOktoikhDayService service = new OktoikhDayService(_unitOfWork, easterContext); IOktoikhDayFactory factory = new OktoikhDayFactory(); IMigrationManager manager = new OktoikhDayMigrationManager(factory, reader, service); manager.Migrate(); }
private ScheduleService CreateScheduleService() { var easters = new EasterContext(_unitOfWork); BookStorage bookStorage = new BookStorage(new EvangelionContext(_unitOfWork), new ApostolContext(_unitOfWork), new OldTestamentContext(_unitOfWork), new PsalterContext(_unitOfWork), new OktoikhContext(_unitOfWork, easters), new TheotokionAppContext(_unitOfWork), new EasterContext(_unitOfWork), new KatavasiaContext(_unitOfWork)); IRuleSerializerRoot serializerRoot = new RuleSerializerRoot(bookStorage); return(new ScheduleService(new RuleHandlerSettingsFactory(), serializerRoot)); }
public static BookStorage Create(IUnitOfWork unitOfWork) { if (unitOfWork == null) { throw new ArgumentNullException("unitOfWork"); } var easters = new EasterContext(unitOfWork); return(new BookStorage(new EvangelionContext(unitOfWork), new ApostolContext(unitOfWork), new OldTestamentContext(unitOfWork), new PsalterContext(unitOfWork), new OktoikhContext(unitOfWork, easters), new TheotokionAppContext(unitOfWork), new EasterContext(unitOfWork), new KatavasiaContext(unitOfWork))); }