コード例 #1
0
        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();
        }
コード例 #2
0
        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());
        }
コード例 #3
0
ファイル: ServiceC.cs プロジェクト: zhq199134/netcore3_1
 public string show()
 {
     return(interfaceB.show() + "serviceC...");
 }