main
 1using System.Collections;
 2using System.Collections.Generic;
 3using gorilla.commons.utility;
 4
 5namespace MoMoney.Presentation.Core
 6{
 7    public interface IPresenterRegistry : Registry<IPresenter> {}
 8
 9    public class PresenterRegistry : IPresenterRegistry
10    {
11        readonly Registry<IPresenter> presenters;
12
13        public PresenterRegistry(Registry<IPresenter> presenters)
14        {
15            this.presenters = presenters;
16        }
17
18        public IEnumerable<IPresenter> all()
19        {
20            return presenters.all();
21        }
22
23        public IEnumerator<IPresenter> GetEnumerator()
24        {
25            return all().GetEnumerator();
26        }
27
28        IEnumerator IEnumerable.GetEnumerator()
29        {
30            return GetEnumerator();
31        }
32    }
33}