Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seangwright/c2fb38e93561d7b5069aad5e989cae4b to your computer and use it in GitHub Desktop.
Save seangwright/c2fb38e93561d7b5069aad5e989cae4b to your computer and use it in GitHub Desktop.
/// <summary>
/// Sourced from https://benfoster.io/blog/improving-aspnet-mvc-routing-configuration
/// </summary>
public interface IRouteRegistry
{
/// <summary>
/// Provides the global <see cref="RouteCollection"/> to which the Registery's routes
/// should be added
/// </summary>
/// <param name="routes"></param>
void RegisterRoutes(RouteCollection routes);
/// <summary>
/// Sets the priority of the registry which is used to determine
/// the order in which all Registrys in the application should be added to the
/// global <see cref="RouteCollection"/>. The lowest priority (0) numerically will
/// be registered first.
/// </summary>
int Priority { get; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment