New: Use ASP.NET Core instead of Nancy

(cherry picked from commit 58ddbcd77e17ef95ecfad4b746084ee9326116f3)
This commit is contained in:
ta264
2021-03-15 21:32:12 +00:00
parent 7d494f9743
commit dbdc527f2e
122 changed files with 2177 additions and 2838 deletions

View File

@@ -0,0 +1,27 @@
using System;
using Microsoft.AspNetCore.Mvc.Routing;
namespace Prowlarr.Http
{
public class VersionedFeedControllerAttribute : Attribute, IRouteTemplateProvider
{
public VersionedFeedControllerAttribute(int version, string resource = "[controller]")
{
Version = version;
Template = $"feed/v{Version}/{resource}";
}
public string Template { get; private set; }
public int? Order => 2;
public string Name { get; set; }
public int Version { get; private set; }
}
public class V1FeedControllerAttribute : VersionedApiControllerAttribute
{
public V1FeedControllerAttribute(string resource = "[controller]")
: base(1, resource)
{
}
}
}