public IActionResult Index([FromServices] IFoo foo) { ViewBag.AppName = this._config.AppName; ViewBag.FromServices = foo.GetFoo(); return(View(new Person() { Name = this._config.AppName })); }
public Task Invoke(HttpContext httpContext) { return(httpContext.Response.WriteAsync("In Middleware: " + _foo.GetFoo())); //return _next(httpContext); }
public string GetMessage() { return(_foo.GetFoo() + _bar.GetBar()); }
public string GetMessage() => _foo.GetFoo() + _bar.GetBar();
public DiClass1(IThing <Class1> _thing, IFoo foo) { Console.WriteLine($"DIed {_thing.GetName}"); Console.WriteLine($"{foo.GetFoo()}"); }
public Class1(IFoo foo) { Console.WriteLine(foo.GetFoo()); }