static void Main(string[] args) { Console.WriteLine("Hello World!"); ICSContainer container = new CSContainer(); container.Register <InterfaceA, ClassA>(); container.Register <InterfaceB, ClassB>(); InterfaceB itfb = container.Resolve <InterfaceB>(); itfb.show(); }
public IActionResult Index() { // InterfaceA interfaceA=new ServiceA(); // interfaceA.show(); _logger.LogWarning("this is thirdController Index"); base.ViewBag.Today = this._configuration["Today"]; base.ViewBag.LogLevel = this._configuration["Logging:LogLevel:Default"]; base.ViewBag.Say = this._configuration["Say"]; base.ViewBag.A = _interfaceA.show(); base.ViewBag.B = _interfaceB.show(); base.ViewBag.C = _interfaceC.show(); return(View()); }
public string show() { return(interfaceB.show() + "serviceC..."); }