Beispiel #1
0
    public static void UseGlobalRoutePrefix(this MvcOptions opts, string prefix)
    {
        if (string.IsNullOrWhiteSpace(prefix))
        {
            throw new ArgumentException($"{nameof(prefix)} cannot be empty", nameof(prefix));
        }

        opts.UseGlobalRoutePrefix(new RouteAttribute(prefix));
    }