Show / Hide Table of Contents

Interface IBrowsingCache

Abstract Cache.

Inherited Members
System.IDisposable.Dispose()
Namespace: Gee.External.Browsing.Cache
Assembly: Gee.External.Browsing.dll
Syntax
public interface IBrowsingCache : IDisposable

Methods

GetSafeCacheEntryAsync(String, CancellationToken)

Get a Safe Cache Entry Asynchronously.

Declaration
Task<SafeCacheEntry> GetSafeCacheEntryAsync(string threatSha256HashPrefix, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String threatSha256HashPrefix

A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to retrieve from the cache.

System.Threading.CancellationToken cancellationToken

A cancellation token to cancel the asynchronous operation with.

Returns
Type Description
System.Threading.Tasks.Task<SafeCacheEntry>

The SafeCacheEntry cached for the threat identified by threatSha256HashPrefix. A null reference indicates a safe cache entry is not cached.

Exceptions
Type Condition
BrowsingCacheException

Thrown if a caching error occurs.

System.ArgumentNullException

Thrown if threatSha256HashPrefix is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

GetUnsafeCacheEntryAsync(String, CancellationToken)

Get an Unsafe Cache Entry Asynchronously.

Declaration
Task<UnsafeCacheEntry> GetUnsafeCacheEntryAsync(string threatSha256Hash, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String threatSha256Hash

A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat to retrieve from the cache.

System.Threading.CancellationToken cancellationToken

A cancellation token to cancel the asynchronous operation with.

Returns
Type Description
System.Threading.Tasks.Task<UnsafeCacheEntry>

The UnsafeCacheEntry cached for the threat identified by threatSha256Hash. A null reference indicates an unsafe cache entry is not cached.

Exceptions
Type Condition
BrowsingCacheException

Thrown if a caching error occurs.

System.ArgumentNullException

Thrown if threatSha256Hash is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

PutSafeCacheEntryAsync(SafeCacheEntry, CancellationToken)

Put a Safe Cache Entry Asynchronously.

Declaration
Task PutSafeCacheEntryAsync(SafeCacheEntry safeCacheEntry, CancellationToken cancellationToken)
Parameters
Type Name Description
SafeCacheEntry safeCacheEntry

A SafeCacheEntry 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 safeCacheEntry is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

PutUnsafeCacheEntryAsync(UnsafeCacheEntry, CancellationToken)

Put an Unsafe Cache Entry Asynchronously.

Declaration
Task PutUnsafeCacheEntryAsync(UnsafeCacheEntry unsafeCacheEntry, CancellationToken cancellationToken)
Parameters
Type Name Description
UnsafeCacheEntry unsafeCacheEntry

An UnsafeCacheEntry 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 unsafeCacheEntry is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

RemoveSafeCacheEntryAsync(String, CancellationToken)

Remove a Safe Cache Entry Asynchronously.

Declaration
Task RemoveSafeCacheEntryAsync(string threatSha256HashPrefix, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String threatSha256HashPrefix

A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to remove from the 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 threatSha256HashPrefix is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

RemoveUnsafeCacheEntryAsync(String, CancellationToken)

Remove an Unsafe Cache Entry Asynchronously.

Declaration
Task RemoveUnsafeCacheEntryAsync(string threatSha256Hash, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String threatSha256Hash

A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat to remove from the 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 threatSha256Hash is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

Extension Methods

BrowsingCacheExtension.GetSafeCacheEntryAsync(IBrowsingCache, String)
BrowsingCacheExtension.GetUnsafeCacheEntryAsync(IBrowsingCache, String)
BrowsingCacheExtension.LookupAsync(IBrowsingCache, String, String)
BrowsingCacheExtension.LookupAsync(IBrowsingCache, String, String, CancellationToken)
BrowsingCacheExtension.PutSafeCacheEntryAsync(IBrowsingCache, SafeCacheEntry)
BrowsingCacheExtension.PutSafeCacheEntryAsync(IBrowsingCache, String, DateTime)
BrowsingCacheExtension.PutSafeCacheEntryAsync(IBrowsingCache, String, DateTime, CancellationToken)
BrowsingCacheExtension.PutUnsafeCacheEntryAsync(IBrowsingCache, UnsafeCacheEntry)
BrowsingCacheExtension.PutUnsafeCacheEntryAsync(IBrowsingCache, String, IEnumerable<UnsafeThreat>)
BrowsingCacheExtension.PutUnsafeCacheEntryAsync(IBrowsingCache, String, IEnumerable<UnsafeThreat>, CancellationToken)
BrowsingCacheExtension.RemoveSafeCacheEntryAsync(IBrowsingCache, String)
BrowsingCacheExtension.RemoveUnsafeCacheEntryAsync(IBrowsingCache, String)
Back to top Generated by DocFX