main
 1using Gorilla.Commons.Infrastructure.Container;
 2
 3namespace presentation.windows.presenters
 4{
 5    public class WPFCommandBuilder : UICommandBuilder
 6    {
 7        DependencyRegistry container;
 8
 9        public WPFCommandBuilder(DependencyRegistry container)
10        {
11            this.container = container;
12        }
13
14        public IObservableCommand build<T>(Presenter presenter) where T : UICommand
15        {
16            var command = container.get_a<T>();
17            return new SimpleCommand(() =>
18            {
19                command.run(presenter);
20            });
21        }
22    }
23}