Ejemplo n.º 1
0
        public async Task Invoke(HttpContext httpContext, ITransient transient, IScope scope, ISingleton singleton, INameService nameService)
        {
            var name = await nameService.HelloAsync("tim");

            transient.Count++;
            scope.Count++;
            singleton.Count++;
            await httpContext.Response.WriteAsync(string.Format("transient:\t{0},scope:\t{1},singleton:\t{2}", transient.Count, scope.Count, singleton.Count));

            //return _next(httpContext);
        }