Class BrowsingCacheExtension
Cache Extension.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing.Cache
Assembly: Gee.External.Browsing.dll
Syntax
public static class BrowsingCacheExtension
Methods
GetSafeCacheEntryAsync(IBrowsingCache, String)
Get a Safe Cache Entry Asynchronously.
Declaration
public static Task<SafeCacheEntry> GetSafeCacheEntryAsync(this IBrowsingCache this, string threatSha256HashPrefix)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to retrieve from the cache. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SafeCacheEntry> | The SafeCacheEntry cached for the threat identified by
|
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
GetUnsafeCacheEntryAsync(IBrowsingCache, String)
Get an Unsafe Cache Entry Asynchronously.
Declaration
public static Task<UnsafeCacheEntry> GetUnsafeCacheEntryAsync(this IBrowsingCache this, string threatSha256Hash)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat to retrieve from the cache. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<UnsafeCacheEntry> | The UnsafeCacheEntry cached for the threat identified by
|
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
LookupAsync(IBrowsingCache, String, String)
Lookup a Threat Asynchronously.
Declaration
public static Task<CacheLookupResult> LookupAsync(this IBrowsingCache this, string threatSha256Hash, string threatSha256HashPrefix)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat to lookup in the cache. |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to lookup in the cache. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CacheLookupResult> | A CacheLookupResult indicating the nature of the operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
LookupAsync(IBrowsingCache, String, String, CancellationToken)
Lookup a Threat Asynchronously.
Declaration
public static Task<CacheLookupResult> LookupAsync(this IBrowsingCache this, string threatSha256Hash, string threatSha256HashPrefix, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat to lookup in the cache. |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to lookup in the cache. |
System.Threading.CancellationToken | cancellationToken | A cancellation token to cancel the asynchronous operation with. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CacheLookupResult> | A CacheLookupResult indicating the nature of the operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
System.OperationCanceledException | Thrown if the asynchronous operation is cancelled. |
PutSafeCacheEntryAsync(IBrowsingCache, SafeCacheEntry)
Put a Safe Cache Entry Asynchronously.
Declaration
public static Task PutSafeCacheEntryAsync(this IBrowsingCache this, SafeCacheEntry safeCacheEntry)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
SafeCacheEntry | safeCacheEntry | A SafeCacheEntry to cache. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
PutSafeCacheEntryAsync(IBrowsingCache, String, DateTime)
Put a Safe Cache Entry Asynchronously.
Declaration
public static Task PutSafeCacheEntryAsync(this IBrowsingCache this, string threatSha256HashPrefix, DateTime expirationDate)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to cache. |
System.DateTime | expirationDate | The date, in Coordinated Universal Time (UTC), the safe cache entry expires and the threat identified
by |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
PutSafeCacheEntryAsync(IBrowsingCache, String, DateTime, CancellationToken)
Put a Safe Cache Entry Asynchronously.
Declaration
public static Task PutSafeCacheEntryAsync(this IBrowsingCache this, string threatSha256HashPrefix, DateTime expirationDate, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to cache. |
System.DateTime | expirationDate | The date, in Coordinated Universal Time (UTC), the safe cache entry expires and the threat identified
by |
System.Threading.CancellationToken | cancellationToken | A cancellation token to cancel the asynchronous operation with. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if the object is disposed. |
System.OperationCanceledException | Thrown if the asynchronous operation is cancelled. |
PutUnsafeCacheEntryAsync(IBrowsingCache, UnsafeCacheEntry)
Put an Unsafe Cache Entry Asynchronously.
Declaration
public static Task PutUnsafeCacheEntryAsync(this IBrowsingCache this, UnsafeCacheEntry unsafeCacheEntry)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
UnsafeCacheEntry | unsafeCacheEntry | An UnsafeCacheEntry to cache. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
PutUnsafeCacheEntryAsync(IBrowsingCache, String, IEnumerable<UnsafeThreat>)
Put an Unsafe Cache Entry Asynchronously.
Declaration
public static Task PutUnsafeCacheEntryAsync(this IBrowsingCache this, string threatSha256Hash, IEnumerable<UnsafeThreat> unsafeThreats)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat to cache. |
System.Collections.Generic.IEnumerable<UnsafeThreat> | unsafeThreats | A collection of UnsafeThreat to cache. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
PutUnsafeCacheEntryAsync(IBrowsingCache, String, IEnumerable<UnsafeThreat>, CancellationToken)
Put an Unsafe Cache Entry Asynchronously.
Declaration
public static Task PutUnsafeCacheEntryAsync(this IBrowsingCache this, string threatSha256Hash, IEnumerable<UnsafeThreat> unsafeThreats, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat to cache. |
System.Collections.Generic.IEnumerable<UnsafeThreat> | unsafeThreats | A collection of UnsafeThreat to cache. |
System.Threading.CancellationToken | cancellationToken | A cancellation token to cancel the asynchronous operation with. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
System.OperationCanceledException | Thrown if the asynchronous operation is cancelled. |
RemoveSafeCacheEntryAsync(IBrowsingCache, String)
Remove a Safe Cache Entry Asynchronously.
Declaration
public static Task RemoveSafeCacheEntryAsync(this IBrowsingCache this, string threatSha256HashPrefix)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to remove from the cache. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |
RemoveUnsafeCacheEntryAsync(IBrowsingCache, String)
Remove an Unsafe Cache Entry Asynchronously.
Declaration
public static Task RemoveUnsafeCacheEntryAsync(this IBrowsingCache this, string threatSha256Hash)
Parameters
Type | Name | Description |
---|---|---|
IBrowsingCache | this | |
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat to remove from the cache. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
BrowsingCacheException | Thrown if a caching error occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if |