This commit is contained in:
StellaOps Bot
2025-12-13 02:22:15 +02:00
parent 564df71bfb
commit 999e26a48e
395 changed files with 25045 additions and 2224 deletions

View File

@@ -28,7 +28,7 @@ internal sealed record ChromiumCursor(
var cacheDocument = new DocumentObject();
foreach (var (key, entry) in FetchCache)
{
cacheDocument[key] = entry.ToBson();
cacheDocument[key] = entry.ToDocument();
}
document["fetchCache"] = cacheDocument;
@@ -113,7 +113,7 @@ internal sealed record ChromiumCursor(
{
if (element.Value is DocumentObject entryDocument)
{
dictionary[element.Name] = ChromiumFetchCacheEntry.FromBson(entryDocument);
dictionary[element.Name] = ChromiumFetchCacheEntry.FromDocument(entryDocument);
}
}
@@ -125,7 +125,7 @@ internal sealed record ChromiumFetchCacheEntry(string Sha256)
{
public static ChromiumFetchCacheEntry Empty { get; } = new(string.Empty);
public DocumentObject ToBson()
public DocumentObject ToDocument()
{
var document = new DocumentObject
{
@@ -135,7 +135,7 @@ internal sealed record ChromiumFetchCacheEntry(string Sha256)
return document;
}
public static ChromiumFetchCacheEntry FromBson(DocumentObject document)
public static ChromiumFetchCacheEntry FromDocument(DocumentObject document)
{
var sha = document.TryGetValue("sha256", out var shaValue) ? shaValue.AsString : string.Empty;
return new ChromiumFetchCacheEntry(sha);