예제 #1
0
        public static void Main(string[] args)
        {
            var container = new StandardKernel(new DependencyBootstrapper());

            var wallPresenter = new WallPresenter(new Clock(), new UserViewModel());

            var bus = container.Get <IBus>();

            bus.RegisterHandlers((IHandleMessagesOf <MessagePosted>)wallPresenter);
            bus.RegisterHandlers((IHandleMessagesOf <UserFollowed>)wallPresenter);

            var userView = new UserView(wallPresenter, bus);

            userView.Show();
        }
예제 #2
0
 public UserView(WallPresenter wallPresenter, IBus bus)
 {
     this.wallPresenter = wallPresenter;
     this.bus           = bus;
 }