Skip to content

ASP.NET Core support #94

Closed
Closed
@tallesl

Description

@tallesl

While the library supports .NET Core, it's not already clear what would be needed to support running it with ASP.NET Core.

You can find out when ASP.NET Core is shutting down with the following Startup.cs (adapted Getting Started):

using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;

namespace aspnetcoreapp
{
    public class Startup
    {
        public void Configure(IApplicationBuilder app, IApplicationLifetime lifetime) // added the IApplicationLifetime parameter
        {
            app.Run(context =>
            {
                return context.Response.WriteAsync("Hello from ASP.NET Core!");
            });
            lifetime.ApplicationStopping.Register(() => Console.WriteLine("Bye from ASP.NET Core!")); // added this line
        }
    }
}

But then there's two problems one problem:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions