Esempio n. 1
0
        public HarryPotterStoryUseCase()
        {
            repository = new StoryRepostiory();
            var resourceLoader = StringsResourcesHelpers.SafeGetForCurrentViewAsync().Result;

            foreach (var(order, titleKey, contentKey) in ApplicationSettings.HarryPotterStoryTextResources)
            {
                repository.Add(resourceLoader.GetString(titleKey), resourceLoader.GetString(contentKey));
            }
            AllStories = new ObservableCollection <StoryEntity>(repository.All());

            InitialStory = AllStories.FirstOrDefault();

            CurrentStory = new ReactivePropertySlim <StoryEntity>
            {
                Value = InitialStory
            };
        }