Exemplo n.º 1
0
        private static IPresenter BuildPresenters(
            Action <IPresenter> presenterCreatedCallback,
            //IAppState appState,
            IPresenterFactory presenterFactory,
            PresenterBinding binding)
        {
            IView viewToCreateFor = binding.ViewInstance;

            return(BuildPresenter(
                       presenterCreatedCallback,
                       //appState,
                       presenterFactory,
                       binding,
                       viewToCreateFor));
        }
Exemplo n.º 2
0
        private static IPresenter BuildPresenter(
            Action <IPresenter> presenterCreatedCallback,
            //IAppState appState,
            IPresenterFactory presenterFactory,
            PresenterBinding binding,
            IView viewInstance)
        {
            Tracing.Verbose(
                "Creating presenter of type {0} for view of type {1}. (The actual view instance is of type {2}.)",
                binding.PresenterType.FullName,
                binding.ViewType.FullName,
                viewInstance.GetType().FullName
                );

            var presenter = presenterFactory.Create(binding.PresenterType, binding.ViewType, viewInstance);

            //presenter.Items = appState;

            if (presenterCreatedCallback != null)
            {
                presenterCreatedCallback(presenter);
            }
            return(presenter);
        }
Exemplo n.º 3
0
        private static IPresenter BuildPresenters(
            Action<IPresenter> presenterCreatedCallback,
            //IAppState appState,
            IPresenterFactory presenterFactory,
            PresenterBinding binding)
        {
            IView viewToCreateFor = binding.ViewInstance;

            return BuildPresenter(
                presenterCreatedCallback,
                //appState,
                presenterFactory,
                binding,
                viewToCreateFor);
        }
Exemplo n.º 4
0
        private static IPresenter BuildPresenter(
            Action<IPresenter> presenterCreatedCallback,
            //IAppState appState,
            IPresenterFactory presenterFactory,
            PresenterBinding binding,
            IView viewInstance)
        {
            Tracing.Verbose(
                "Creating presenter of type {0} for view of type {1}. (The actual view instance is of type {2}.)",
                binding.PresenterType.FullName,
                binding.ViewType.FullName,
                viewInstance.GetType().FullName
                );

            var presenter = presenterFactory.Create(binding.PresenterType, binding.ViewType, viewInstance);

            //presenter.Items = appState;

            if (presenterCreatedCallback != null)
            {
                presenterCreatedCallback(presenter);
            }
            return presenter;
        }