Libation/Source/AppScaffolding/UpgradeProperties.cs
2023-03-27 11:14:54 -06:00

27 lines
657 B
C#

using System;
using System.Text.RegularExpressions;
namespace AppScaffolding
{
public partial record UpgradeProperties
{
public string ZipUrl { get; }
public string HtmlUrl { get; }
public string ZipName { get; }
public Version LatestRelease { get; }
public string Notes { get; }
public UpgradeProperties(string zipUrl, string htmlUrl, string zipName, Version latestRelease, string notes)
{
ZipName = zipName;
HtmlUrl = htmlUrl;
ZipUrl = zipUrl;
LatestRelease = latestRelease;
Notes = LinkStripRegex().Replace(notes, "$1");
}
[GeneratedRegex(@"\[(.*)\]\(.*\)")]
private static partial Regex LinkStripRegex();
}
}