//private List<PicasaEntry> albums;
        //private int albumIndex;
        //private PicasaFeed currentAlbum;
        //private int photoIndex;
        public PicasaImageService(IRepository<PicasaImageSettings> settingsRepository, IEventAggregator eventAggregator)
        {
            EventAggregator = eventAggregator;
              settings = settingsRepository.Load();

              BeginLoadAlbums();

              SubscribeToEvents();
        }
        public FileSystemImageService(IRepository<FileSystemImageSettings> repository, IEventAggregator eventAggregator)
        {
            Repository = repository;
            EventAggregator = eventAggregator;

            _fileSystemImageSettings = Repository.Load();

            BeginLoadImageFiles();

            SubscribeToEvents();
        }
        public WeatherViewModel(IRepository<WeatherSettings> repository, IWeatherService weatherService,
                                IEventAggregator eventAggregator)
        {
            EventAggregator = eventAggregator;

            _weatherService = weatherService;
            _weatherService.WeatherRetrieved += (s, e) => WeatherReport = e.Payload;

            _weatherSettings = repository.Load();

            GetLatestWeather();

            var timer = new DispatcherTimer
                            {
                                Interval = new TimeSpan(0, 1, 0, 0)
                            };

            timer.Tick += OnTimerElapsed;

            timer.Start();

            SubscribeToEvents();
        }
 public void Load(IRepository<Book> repository) {
     try {
         Books.AddRange(repository.Load());
     } catch(Exception ex) {
         throw new BookListServiceException("Incorrect realization of repository", ex);
     }
 }
 public BookListService(IRepository<Book> repository) {
     Books = repository.Load();
 }
 public void Load(string path, IRepository serializator)
 {
     try
     {
         List<Book> list = serializator.Load(path);
         for (int i = 0; i < list.Count; i++)
             _books.Add(list[i]);
     }
     catch (ArgumentException e)
     {
         _log.Warn("Can't read the file. {0}", e.Message);
         throw;
     }
 }
 public BookListService(IRepository<Book> repository)
 {
     this.Repository = repository;
     books = Repository.Load();
 }