Esempio n. 1
0
        public NotesBarModel(IAnnotationRepository repository, NotesToRecordMapping mapping)
        {
            _repository = repository;
            _mapping    = mapping;

            repository.AddObserver(this, new NullProgress());
        }
Esempio n. 2
0
        public NotesBarModel(IAnnotationRepository repository, NotesToRecordMapping mapping)
        {
            _repository = repository;
            _mapping = mapping;

            repository.AddObserver(this, new NullProgress());
        }
 /// <summary>
 /// Add the observer to each repository.
 /// Note that if there are any _others, the same observer will be added to each,
 /// which currently results in its Initialize method being called with the GetAllAnnotations of each repo.
 /// Thus, in such cases, the observer's Initialize method must be capable of being called repeatedly
 /// and accumulating the results.
 /// </summary>
 /// <param name="observer"></param>
 /// <param name="progress"></param>
 public void AddObserver(IAnnotationRepositoryObserver observer, IProgress progress)
 {
     _primary.AddObserver(observer, progress);
     foreach (var other in _others)
     {
         other.AddObserver(observer, progress);
     }
 }