-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload license expression redirect url logic (#6641)
* Upload license expression redirect url logic * fix nit and update
- Loading branch information
Showing
4 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/NuGetGallery/Helpers/LicenseExpressionRedirectUrlHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
|
||
namespace NuGetGallery.Helpers | ||
{ | ||
public static class LicenseExpressionRedirectUrlHelper | ||
{ | ||
private const string LicenseExpressionDeprecationUrlFormat = "https://licenses.nuget.org/{0}"; | ||
|
||
public static string GetLicenseExpressionRedirectUrl(string licenseExpression) | ||
{ | ||
return new Uri(string.Format(LicenseExpressionDeprecationUrlFormat, licenseExpression)).AbsoluteUri; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters