Skip to content

Commit 25419dd

Browse files
committed
Marked MapTopicRoute(IRouteBuilder) obsolete
Moving forward, all extension methods are being implemented for `IEndpointRouteBuilder` since it's the recommended routing middleware for ASP.NET 3.0+. In OnTopic 5.0.0—which will likely correspond with support for .NET 5.0—we'll be removing support for `MapTopicRoute(IRouteBuilder)` entirely. As such, it's being flagged as deprecated now via the `[Obsolete()]` attribute.
1 parent 865f26a commit 25419dd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

OnTopic.AspNetCore.Mvc/ServiceCollectionExtensions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ public static IMvcBuilder AddTopicSupport(this IMvcBuilder services) {
6464
/// <summary>
6565
/// Adds an MVC route for handling OnTopic related requests, and maps it to the <see cref="TopicController"/> by default.
6666
/// </summary>
67+
/// <remarks>
68+
/// For ASP.NET Core 3, prefer instead <see cref="MapTopicRoute(IEndpointRouteBuilder, String, String, String)"/>, as
69+
/// endpoint routing is preferred in ASP.NET Core 3. OnTopic also offers far more extension methods for endpoint routing,
70+
/// while this method is provided exclusively for backward compatibility.
71+
/// </remarks>
72+
[Obsolete("This method is deprecated and will be removed in OnTopic 5. Callers should migrate to endpoint routing.", false)]
6773
public static IRouteBuilder MapTopicRoute(
6874
this IRouteBuilder routes,
6975
string rootTopic,

0 commit comments

Comments
 (0)