summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/ClientPlatformDetection/ClientPlatformMiddlewareExtensions.cs
blob: 274e54868e9e21641298d9cb2de3a09692e9c7d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using Microsoft.AspNetCore.Builder;

namespace StardewModdingAPI.Web.Framework.ClientPlatformDetection
{
    /// <summary>Extension methods for the client platform middleware.</summary>
    internal static class ClientPlatformMiddlewareExtensions
    {
        /// <summary>Adds client platform detection to the request pipeline.</summary>
        /// <param name="builder">The application builder.</param>
        /// <returns>The application builder with the client platform middleware enabled.</returns>
        public static IApplicationBuilder UseClientPlatform(this IApplicationBuilder builder)
        {
            return builder.UseMiddleware<ClientPlatformMiddleware>();
        }
    }
}