summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/VersionConstraint.cs
blob: 2d6ec603b1c9212b652653a49c8fae78a1cba608 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using Microsoft.AspNetCore.Routing.Constraints;
using StardewModdingAPI.Toolkit;

namespace StardewModdingAPI.Web.Framework
{
    /// <summary>Constrains a route value to a valid semantic version.</summary>
    internal class VersionConstraint : RegexRouteConstraint
    {
        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        public VersionConstraint()
            : base(SemanticVersion.Regex) { }
    }
}