本文整理汇总了C#中IRepository.Load方法的典型用法代码示例。如果您正苦于以下问题:C# IRepository.Load方法的具体用法?C# IRepository.Load怎么用?C# IRepository.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRepository
的用法示例。
在下文中一共展示了IRepository.Load方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PicasaImageService
//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();
}
示例2: FileSystemImageService
public FileSystemImageService(IRepository<FileSystemImageSettings> repository, IEventAggregator eventAggregator)
{
Repository = repository;
EventAggregator = eventAggregator;
_fileSystemImageSettings = Repository.Load();
BeginLoadImageFiles();
SubscribeToEvents();
}
示例3: WeatherViewModel
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();
}
示例4: Load
public void Load(IRepository<Book> repository) {
try {
Books.AddRange(repository.Load());
} catch(Exception ex) {
throw new BookListServiceException("Incorrect realization of repository", ex);
}
}
示例5: BookListService
public BookListService(IRepository<Book> repository) {
Books = repository.Load();
}
示例6: 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;
}
}
示例7: BookListService
public BookListService(IRepository<Book> repository)
{
this.Repository = repository;
books = Repository.Load();
}