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(); }
public UserView(WallPresenter wallPresenter, IBus bus) { this.wallPresenter = wallPresenter; this.bus = bus; }