Esempio n. 1
0
        public IActionResult Index()
        {
            ViewBag.ServiceA = _serviceA.Run();
            ViewBag.ServiceB = _serviceB.Run();
            ViewBag.ServiceC = _serviceC.Run();

            return(View());
        }
Esempio n. 2
0
        public IActionResult Index2()
        {
            IServiceA serviceA = DependencyResolver.Current.GetService <IServiceA>();
            IServiceB serviceB = DependencyResolver.Current.GetService <IServiceB>();
            IServiceC serviceC = DependencyResolver.Current.GetService <IServiceC>();

            ViewBag.ServiceA = serviceA.Run();
            ViewBag.ServiceB = serviceB.Run();
            ViewBag.ServiceC = serviceC.Run();

            return(View("Index"));
        }
Esempio n. 3
0
        public IActionResult Index()
        {
            InputDTO inputA = new InputDTO();

            inputA.str = "ServiceA";

            ViewBag.ServiceA = _serviceA.Run(inputA);

            InputDTO inputB = new InputDTO();

            inputB.str = "ServiceB";

            ViewBag.ServiceB = _serviceB.Run(inputB);


            InputDTO inputC = new InputDTO();

            inputC.str = "ServiceC";

            ViewBag.ServiceC = _serviceC.Run(inputC);

            return(View());
        }
Esempio n. 4
0
 public void Run()
 {
     _logger.LogInformation("In Service A");
     _serviceB.Run();
 }
 public override void Run()
 {
     base.Run();
     _logger.LogInformation("In Service A @ {id}", System.Threading.Thread.CurrentThread.ManagedThreadId);
     _serviceB.Run();
 }