Exemple #1
0
        private static IPresenter BuildPresenter(
            IPresenterFactory presenterFactory,
            PresenterBinding binding,
            IView viewInstance)
        {
            var presenter = presenterFactory.Create(
                binding.PresenterType, binding.ViewType, viewInstance);

            return(presenter);
        }
Exemple #2
0
        private static IPresenter PerformBinding(
            IView candidate,
            IPresenterFactory presenterFactory)
        {
            var a = new AttributeBasedPresenterDiscoveryStrategy();

            PresenterBinding b = a.GetBinding(candidate);

            var newPresenter = BuildPresenter(
                presenterFactory,
                a.GetBinding(candidate),
                candidate);

            return(newPresenter);
        }