This commit is contained in:
2020-01-28 22:12:47 +00:00
parent 58241cd68d
commit 9e8bac46ab
3 changed files with 32 additions and 19 deletions

View File

@@ -47,7 +47,7 @@ namespace AyaNova.Core
private static Guid TEST_TRIAL_KEY_DBID = new Guid("{A6D18A8A-5613-4979-99DA-80D07641A2FE}");
//Current license key, can be empty
private static AyaNovaLicenseKey _ActiveLicense = new AyaNovaLicenseKey();
@@ -71,7 +71,7 @@ namespace AyaNova.Core
internal class AyaNovaLicenseKey
{
public AyaNovaLicenseKey()
{
{
Features = new List<LicenseFeature>();
RegisteredTo = "UNLICENSED";
Id = RegisteredTo;
@@ -280,7 +280,7 @@ namespace AyaNova.Core
}
/// <summary>
/// <summary>
/// Fetch a summary of the license key for displaying in the log
/// </summary>
/// <returns> string containing current license information</returns>
@@ -292,11 +292,11 @@ namespace AyaNova.Core
if (ActiveKey.IsEmpty)
{
return $"UNLICENSED, DB ID: {DbId}";
return $"UNLICENSED, DB ID: {DbId}";
}
else
{
if (ActiveKey.TrialLicense)
sb.Append("TRIAL, ");
@@ -321,7 +321,7 @@ namespace AyaNova.Core
}
}
return sb.ToString();
return sb.ToString().Trim().TrimEnd(',');
}
}
@@ -437,7 +437,7 @@ namespace AyaNova.Core
try
{
//string RawTextKeyFromRockfish = await _Client.GetStringAsync(sUrl);
string RawTextKeyFromRockfish = await ServiceProviderProvider.HttpClientFactory.CreateClient().GetStringAsync(sUrl);
//FUTURE: if there is any kind of error response or REASON or LicenseFetchStatus then here is