private async Task Initialize() { _presenterService = ServiceProxy.Create <IPresenterService>(new Uri(_presenterServiceUri)); _exComService = ServiceProxy.Create <IExternalCommunicationService>(new Uri(_exComServiceUri)); _securityService = ServiceProxy.Create <ISecurityService>(new Uri(_securityServiceUri)); _currentKpuPackageRequests = new Dictionary <string, List <string> >(); logger.Trace($"Initializing Presenter service"); _presenterService.Initialize().Wait(); logger.Trace($"Initializing Presenter service complete"); try { _configuration = new ConfigurationBuilder().AddXmlFile("App.config").Build(); _amqRoutes = new Dictionary <string, string>(); _amqEndpoint = _configuration["Connection:Endpoint"]; _amqUser = _configuration["Connection:User"]; _amqPassword = _configuration["Connection:Password"]; _amqRoutes["ToBlackboard"] = _configuration["Routes:ToBlackboard"]; _amqRoutes["FromBlackboard"] = _configuration["Routes:FromBlackboard"]; await SetupActiveMq(); } catch (Exception e) { logger.Error($"Exception while reading app.config and getting amq routes: {e.ToString()}"); return; } try { var proxy2 = ActorProxy.Create <IBlackboardActor>(new ActorId(42), "fabric:/Assistant"); Task <bool> ret2 = proxy2.InitBlackboard(); bool retVal3 = ret2.Result; Task rett; rett = proxy2.StartProcessing(); } catch (Exception e) { logger.Error(e.ToString()); } logger.Trace($"Initializing Blackboard Actor complete"); InitializeTransformerActor(); var registerForMessagesAtBlackboardRequest = new RoutingRequest() { Id = "Core", Path = _amqRoutes["FromBlackboard"], ContentTypes = new string[] { BrokerCommands.PACKAGE, BrokerCommands.KPU_REGISTRATION, BrokerCommands.MODEL_UPDATE }, }; var registerPackage = BreanosConnectors.SerializationHelper.Pack(registerForMessagesAtBlackboardRequest); await _activeMqConnector.SendAsync(registerPackage, _amqRoutes["ToBlackboard"], BrokerCommands.CONFIGURE_ROUTES); logger.Trace($"Registration with Blackboard complete."); }
static void Main(string[] args) { _serviceProvider = DependencyInitialization.SetupDependencies(); IGeneratorService generator = _serviceProvider.GetService <IGeneratorService>(); IPresenterService presenter = _serviceProvider.GetService <IPresenterService>(); presenter.Present(generator.GetValues()); _serviceProvider.Dispose(); }
public SampleNavigationService(IPresenterService <SampleViewModel> presenterService) : base(presenterService) { _presenter = presenterService; HomeSync = new ScreenDefinition <SampleViewModel>("home", _ => new SampleViewModel("home").AsTask()); Menu = new ScreenDefinition <SampleViewModel>("menu", _ => new SampleViewModel("menu").AsTask()); Profile = new ScreenDefinition <SampleViewModel>("profile", _ => new SampleViewModel("profile").AsTask()); UpdatePwd = new ScreenDefinition <SampleViewModel>("updatePwd", _ => new SampleViewModel("updatePwd").AsTask()); Cgu = new ScreenDefinition <SampleViewModel>("cgu", _ => new SampleViewModel("cgu").AsTask()); Login = new ScreenDefinition <SampleViewModel>("login", _ => new SampleViewModel("login").AsTask()); ListOffer = new ScreenDefinition <SampleViewModel>("offers", _ => new SampleViewModel("offers").AsTask()); DetailOffer = new ScreenDefinition <SampleViewModel>("{offerId}", _ => new SampleViewModel("{offerId}").AsTask()); DetailProduct = new ScreenDefinition <SampleViewModel>("{productId}", _ => new SampleViewModel("{productId}").AsTask()); //Registre scree associations. this.RegisterEntryPoint(HomeSync); this.RegisterEntryPoint(Login); this.Register(HomeSync, Profile); this.Register(Profile, UpdatePwd); this.Register(Profile, Cgu); this.Register(Login, Cgu); this.Register(HomeSync, ListOffer); this.Register(ListOffer, DetailOffer); this.Register(DetailOffer, DetailProduct); this.Register(DetailOffer, DetailOffer); this.Register(HomeSync, Menu); this.Register(Profile, Menu); this.Register(UpdatePwd, Menu); this.Register(Cgu, Menu); this.Register(ListOffer, Menu); this.Register(DetailOffer, Menu); this.Register(DetailProduct, Menu); }
public NavigationService(IPresenterService <TViewModel> presenterService) { _presenterService = presenterService; }
/// <summary> /// /// </summary> /// <param name="presenterService"></param> /// <param name="presenterFactory"></param> public PresenterController(IPresenterService presenterService, IPresenterFactory presenterFactory) { _presenterService = presenterService; _presenterFactory = presenterFactory; }
// // GET: /Presenter/ public PresenterController(IPresenterService presenterService) { _presenterService = presenterService; }
public PresenterController(IUnitOfWork unitOfWork, IPresenterService PresenterService) { _unitOfWork = unitOfWork; _PresenterService = PresenterService; }
// // GET: /Home/ public HomeController(IPresenterService presenterService) { _presenterService = presenterService; }
public PresenterFactory(IMapper mapper, IPresenterService presenterService) { _mapper = mapper; _presenterService = presenterService; }
public ReportFactory(IReportService reportService, IDoctorService doctorService, IPresenterService presenterService) { _reportService = reportService; _doctorService = doctorService; _presenterService = presenterService; }