up
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user