This commit is contained in:
@@ -297,7 +297,7 @@ namespace Sockeye.Biz
|
||||
}//end of all customers iteration
|
||||
|
||||
#endregion customers
|
||||
|
||||
|
||||
#region CASES
|
||||
/*
|
||||
log.LogInformation("RFImport Cases");
|
||||
@@ -419,7 +419,7 @@ namespace Sockeye.Biz
|
||||
res = await client.GetAsync($"{URL_ROCKFISH}api/license/{jLicenseListItem["id"].Value<long>()}");
|
||||
responseText = await res.Content.ReadAsStringAsync();
|
||||
var jLicense = JObject.Parse(responseText);
|
||||
log.LogInformation($"Importing license:{responseText}");
|
||||
// log.LogInformation($"Importing license:{responseText}");
|
||||
/*
|
||||
{"regTo":"PDI Technologies","customerName":"PDI Technologies","dtcreated":1672261044,"email":"jberkel@pdisoftware.com","code":"na","fetched":true,"dtfetched":1672262347,"fetchFrom":null,
|
||||
"key":"[KEY\n{\n \"Key\": {\n \"LicenseFormat\": \"8\",\n \"Id\": \"1672261044\",\n \"RegisteredTo\": \"PDI Technologies\",\n \"DBID\": \"R6U37uNUN2hSQideG6Gg+MqoQY8vuUeyHFI6Kv7VDsE=\",\n \"Perpetual\": true,\n \"LicenseExpiration\": \"5555-01-01T00:00:00\",\n \"MaintenanceExpiration\": \"2023-12-28T00:00:00\",\n \"Features\": [\n {\n \"Name\": \"ActiveInternalUsers\",\n \"Count\": 5\n }\n ]\n }\n}\nKEY]\n[SIGNATURE\nkzVs8GH0MSIfsR7ZYQ5x+5wdVDJqpfOYvTfBCx32Vs+zqP7h89uUKI17jTx5rMvkOYX40GyJt0pTWOzltljzf+MaoTzoSvTsSPkWtdVWv8ZGOXUUdaZhzMoTJGxTg0JHka/8S5tLkTiuct3x+voiLAKXuFCp9TSZo4+UnejB6U2Bp6MfdZxLtKVZ/1RLu/h4SnP8ZbczuwbQReB1z4k4IRwjh5GHnUUm6YqZg/04m1X9FEeKQZQfGZk/qZ788jONbLQb4CLnq0/ZmIteeocDDBz59TYaC9BHwHp73y8jyPfEugVfyH2AE0J8ZILiFiozYQ7meP5X4ZOmd1nhTA8MkA==\nSIGNATURE]\n"
|
||||
@@ -491,7 +491,7 @@ namespace Sockeye.Biz
|
||||
string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(KeyText, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1");
|
||||
var jKey = JObject.Parse(keyNoWS);
|
||||
l.LicenseExpire = DateTime.MaxValue;
|
||||
l.MaintenanceExpire = DateUtil.EpochToDateNullIsMin(jKey["Expires"].Value<long>());
|
||||
l.MaintenanceExpire = jKey["Key"]["Expires"].Value<DateTime>();
|
||||
l.FetchCode = jLicense["code"].Value<string>();
|
||||
l.Tags.Add("v7");
|
||||
}
|
||||
@@ -519,13 +519,13 @@ namespace Sockeye.Biz
|
||||
*/
|
||||
string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(KeyText, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1");
|
||||
var jKey = JObject.Parse(keyNoWS);
|
||||
l.DbId = jKey["DBID"].Value<string>();
|
||||
l.LicenseExpire = DateUtil.EpochToDateNullIsMin(jKey["LicenseExpiration"].Value<long>());
|
||||
l.MaintenanceExpire = DateUtil.EpochToDateNullIsMin(jKey["MaintenanceExpiration"].Value<long>());
|
||||
l.DbId = jKey["Key"]["DBID"].Value<string>();
|
||||
l.LicenseExpire = jKey["Key"]["LicenseExpiration"].Value<DateTime>();
|
||||
l.MaintenanceExpire = jKey["Key"]["MaintenanceExpiration"].Value<DateTime>();
|
||||
l.Tags.Add("raven");
|
||||
}
|
||||
|
||||
l.Created = (DateTime)DateUtil.EpochToDateNullIsNull(jLicense["dtCreated"].Value<long>());
|
||||
l.Created = (DateTime)DateUtil.EpochToDateNullIsNull(jLicense["dtcreated"].Value<long>());
|
||||
l.FetchedOn = DateUtil.EpochToDateNullIsNull(jLicense["dtfetched"].Value<long?>());
|
||||
l.FetchEmail = jLicense["email"].Value<string>();
|
||||
l.Key = jLicense["key"].Value<string>();
|
||||
|
||||
Reference in New Issue
Block a user