Prepare startup.cs for netcoreapp3.0

This commit is contained in:
nicolas.dorier
2019-10-03 18:46:09 +09:00
parent 411fe90b8c
commit c9ec0f9d3c
4 changed files with 33 additions and 6 deletions

View File

@@ -14,6 +14,10 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
using BTCPayServer.Data;
using Microsoft.AspNetCore.Http;
#if !NETCOREAPP21
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Builder;
#endif
namespace BTCPayServer.PaymentRequest
{
@@ -85,7 +89,12 @@ namespace BTCPayServer.PaymentRequest
{
return request.GetRelativePathOrAbsolute("/payment-requests/hub");
}
#if NETCOREAPP21
public static void Register(HubRouteBuilder route)
#else
public static void Register(IEndpointRouteBuilder route)
#endif
{
route.MapHub<PaymentRequestHub>("/payment-requests/hub");
}