public static BibleClient Create(string culture, IRepository repository) { var books = repository.GetBibleBooksAsync(culture).Result; var bookDictionary = books.ToDictionary(book => book.Order, book => book.Name); var bookMappings = repository.GetBibleBooksAsync("en-US").Result.OrderBy(book => book.Order) .ToDictionary(book => bookDictionary[book.Order], book => book.Name); var verseLocator = VerseLocator.Create(books); return(new BibleClient(verseLocator, bookMappings)); }
public async Task <string> GetPattern(string culture) { var verseLocator = VerseLocator.Create(await repository.GetBibleBooksAsync(culture)); return(verseLocator.GetPattern()); }