Show / Hide Table of Contents

Class BaseJsonBrowsingDatabase

Base JSON Database.

Inheritance
System.Object
BaseJsonBrowsingDatabase
ManagedJsonBrowsingDatabase
UnmanagedJsonBrowsingDatabase
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Gee.External.Browsing.Databases.Json
Assembly: Gee.External.Browsing.dll
Syntax
public abstract class BaseJsonBrowsingDatabase

Properties

DatabaseFilePath

Get Database File Path.

Declaration
public string DatabaseFilePath { get; }
Property Value
Type
System.String

Methods

Dispose()

Dispose Object.

Declaration
public void Dispose()

Finalize()

Destroy a Base JSON Database.

Declaration
protected void Finalize()

FindThreatListsAsync(String, CancellationToken)

Find Threat Lists Asynchronously.

Declaration
public virtual Task<IReadOnlyCollection<ThreatList>> FindThreatListsAsync(string threatSha256HashPrefix, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String threatSha256HashPrefix

A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat associated with the collection of ThreatList to retrieve.

System.Threading.CancellationToken cancellationToken

A cancellation token to cancel the asynchronous operation with.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<ThreatList>>

A collection of ThreatList the threat identified by threatSha256HashPrefix is associated with. An empty collection indicates no threat lists were found.

Exceptions
Type Condition
BrowsingDatabaseException

Thrown if a database 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.

GetThreatListAsync(ThreatListDescriptor, CancellationToken)

Get a Threat List Asynchronously.

Declaration
public virtual Task<ThreatList> GetThreatListAsync(ThreatListDescriptor threatListDescriptor, CancellationToken cancellationToken)
Parameters
Type Name Description
ThreatListDescriptor threatListDescriptor

A ThreatListDescriptor identifying the ThreatList to retrieve.

System.Threading.CancellationToken cancellationToken

A cancellation token to cancel the asynchronous operation with.

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

The ThreatList identified by threatListDescriptor. A null reference indicates a threat list could not be found.

Exceptions
Type Condition
BrowsingDatabaseException

Thrown if a database error occurs.

System.ArgumentNullException

Thrown if threatListDescriptor is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

GetThreatListsAsync(CancellationToken)

Get Threat Lists Asynchronously.

Declaration
public virtual Task<IReadOnlyCollection<ThreatList>> GetThreatListsAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

A cancellation token to cancel the asynchronous operation with.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<ThreatList>>

A collection of ThreatList. An empty collection indicates no threat lists were found.

Exceptions
Type Condition
BrowsingDatabaseException

Thrown if a database error occurs.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

GetThreatsAsync(ThreatListDescriptor, CancellationToken)

Get Threats Asynchronously.

Declaration
public virtual Task<IReadOnlyCollection<string>> GetThreatsAsync(ThreatListDescriptor threatListDescriptor, CancellationToken cancellationToken)
Parameters
Type Name Description
ThreatListDescriptor threatListDescriptor

A ThreatListDescriptor identifying the ThreatList the threats that should be retrieved are associated with.

System.Threading.CancellationToken cancellationToken

A cancellation token to cancel the asynchronous operation with.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<System.String>>

A collection of SHA256 hash prefixes, formatted as hexadecimal encoded strings, identifying the threats that are associated with the ThreatList identified by threatListDescriptor. An empty collection indicates no threats were found.

Exceptions
Type Condition
BrowsingDatabaseException

Thrown if a database error occurs.

System.ArgumentNullException

Thrown if threatListDescriptor is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

ModifyThreatListAsync(ThreatList, IEnumerable<String>, IEnumerable<Int32>, CancellationToken)

Modify a Threat List Asynchronously.

Declaration
public virtual Task ModifyThreatListAsync(ThreatList threatList, IEnumerable<string> threatSha256HashPrefixes, IEnumerable<int> threatIndices, CancellationToken cancellationToken)
Parameters
Type Name Description
ThreatList threatList

A ThreatList to modify.

System.Collections.Generic.IEnumerable<System.String> threatSha256HashPrefixes

A collection of SHA256 hash prefixes, formatted as hexadecimal encoded strings, identifying the threats associated with threatList and should be stored.

System.Collections.Generic.IEnumerable<System.Int32> threatIndices

A collection of zero-based indices identifying the threats associated with the lexicographically sorted threatList and should be removed.

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
BrowsingDatabaseException

Thrown if a database error occurs.

System.ArgumentNullException

Thrown if threatList is a null reference, or if threatSha256HashPrefixes is a null reference, or if threatIndices is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

StoreThreatListAsync(ThreatList, IEnumerable<String>, CancellationToken)

Store a Threat List Asynchronously.

Declaration
public virtual Task StoreThreatListAsync(ThreatList threatList, IEnumerable<string> threatSha256HashPrefixes, CancellationToken cancellationToken)
Parameters
Type Name Description
ThreatList threatList

A ThreatList to store.

System.Collections.Generic.IEnumerable<System.String> threatSha256HashPrefixes

A collection of SHA256 hash prefixes, formatted as hexadecimal encoded strings, identifying the threats associated with threatList and should be stored.

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
BrowsingDatabaseException

Thrown if a database error occurs.

System.ArgumentNullException

Thrown if threatList is a null reference, or if threatSha256HashPrefixes is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

Back to top Generated by DocFX