Closed Swimburger closed 2 years ago
Couple of updates:
Results.Extensions.TwiML
as it is the recommended way @dprothero what are the next steps to get this towards a mergable state?
@Swimburger I think it's there!
@dprothero this is ready for review, would you like to review it or should I ask someone else?
ASP.NET Core 6 introduced a new way to build web applications using Minimal API. This doesn't use controllers or action results, but uses the new
IResult
type. It is suggested to add extension methods toIResultExtensions
so it can be invoked usingResults.Extensions.YourExtension
. Here's the guidance I found: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0#customizing-resultsTo get this to work, I had to make a couple of decisions which should be up for discussion:
net6.0
. This is probably not acceptable to maintain support for older versions of .NET.Twilio.AspNet.Core.MinimalApi
to prevent name collisions.IResultExtensions
, it'll make it so the extension method is available atResults.Extensions.TwiML
, but we could just create our own static typeTwilioResults.TwiML
or something similar.This is how the new code would be used:
What do y'all think?
Contributing to Twilio