Beispiel #1
0
        public IWindow ResolveWindow()
        {
            IProductChannelFactory channelFactory =
                new ProductChannelFactory();
            IClientContractMapper mapper =
                new ClientContractMapper();
            IProductManagementAgent wcfAgent =
                new WcfProductManagementAgent(
                    channelFactory, mapper);

            var                     timeout             = TimeSpan.FromMinutes(1);
            ICircuitBreaker         breaker             = new CircuitBreaker(timeout);
            IProductManagementAgent circuitBreakerAgent =
                new CircuitBreakerProductManagementAgent(wcfAgent, breaker);

            IProductManagementAgent errorHandlingAgent =
                new ErrorHandlingProductManagementAgent(
                    circuitBreakerAgent);

            IMainWindowViewModelFactory vmFactory =
                new MainWindowViewModelFactory(
                    errorHandlingAgent);

            Window  mainWindow = new MainWindow();
            IWindow w          =
                new MainWindowAdapter(mainWindow, vmFactory);

            return(w);
        }
		public IWindow ResolveWindow()
		{
			IProductChannelFactory channelFactory =
				new ProductChannelFactory();
			IClientContractMapper mapper =
				new ClientContractMapper();
			IProductManagementAgent wcfAgent =
				new WcfProductManagementAgent(
					channelFactory, mapper);

			var timeout = TimeSpan.FromMinutes(1);
			ICircuitBreaker breaker = new CircuitBreaker(timeout);
			IProductManagementAgent circuitBreakerAgent =
				new CircuitBreakerProductManagementAgent(wcfAgent, breaker);

			IProductManagementAgent errorHandlingAgent =
				new ErrorHandlingProductManagementAgent(
					circuitBreakerAgent);

			IMainWindowViewModelFactory vmFactory =
				new MainWindowViewModelFactory(
					errorHandlingAgent);

			Window mainWindow = new MainWindow();
			IWindow w =
				new MainWindowAdapter(mainWindow, vmFactory);
			return w;
		}
        public IWindow ResolveWindow()
        {
            IProductChannelFactory channelFactory =
                new ProductChannelFactory();
            IClientContractMapper mapper =
                new ClientContractMapper();
            IProductManagementAgent agent = 
                new WcfProductManagementAgent(
                    channelFactory, mapper);

            IMainWindowViewModelFactory vmFactory = 
                new MainWindowViewModelFactory(agent);

            Window mainWindow = new MainWindow();
            IWindow w = 
                new MainWindowAdapter(mainWindow, vmFactory);
            return w;
        }
        public IWindow ResolveWindow()
        {
            IProductChannelFactory channelFactory =
                new ProductChannelFactory();
            IClientContractMapper mapper =
                new ClientContractMapper();
            IProductManagementAgent agent =
                new WcfProductManagementAgent(
                    channelFactory, mapper);

            IMainWindowViewModelFactory vmFactory =
                new MainWindowViewModelFactory(agent);

            Window  mainWindow = new MainWindow();
            IWindow w          =
                new MainWindowAdapter(mainWindow, vmFactory);

            return(w);
        }