Example #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));
        }
Example #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);
        }
Example #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);
        }
Example #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;
        }