TwitchLib / TwitchLib.EventSub.Webhooks

Provides an easy way to setup a Twitch EventSub Webhooks Server
6 stars 7 forks source link

UseTwitchLibEventSubWebhooks support for .NET 7+ IHostApplicationBuilder #6

Open darrenfoley opened 4 months ago

darrenfoley commented 4 months ago

The UseTwitchLibEventSubWebhooks extension method is currently defined on IApplicationBuilder, which is being phased out in favor of IHostApplicationBuilder.

HostApplicationBuilder is returned by Host.CreateApplicationBuilder() and implements IHostApplicationBuilder. WebApplicationBuilder is returned by WebApplication.CreateBuilder() and also implements IHostApplicationBuilder.

Can we get support for this new interface?

Syzuna commented 4 months ago

Hmm yeah I can look into that. Currently busy with client work that's why it's been slow around here but I can try to sneak it in

darrenfoley commented 3 months ago

I was actually wrong about part of this. WebApplication.CreateBuilder().Build() returns a WebApplication, which does indeed implement IApplicationBuilder.

Host.CreateApplicationBuilder().Build() returns an IHost though, so that doesn't work. That said, I'm not sure if you want it to work or just want to require people to use a WebApplication. Feel free to close if you see fit.