Show / Hide Table of Contents

Class BrowsingClientExtension

Client Extension.

Inheritance
System.Object
BrowsingClientExtension
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.Clients
Assembly: Gee.External.Browsing.dll
Syntax
public static class BrowsingClientExtension

Methods

FindFullHashesAsync(IBrowsingClient, FullHashRequest)

Find Full Hashes Asynchronously.

Declaration
public static Task<FullHashResponse> FindFullHashesAsync(this IBrowsingClient this, FullHashRequest request)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

FullHashRequest request

A FullHashRequest.

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

A FullHashResponse.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

Thrown if this is a null reference, or if request is a null reference.

System.ObjectDisposedException

Thrown if this is disposed.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

FindFullHashesAsync(IBrowsingClient, String, IEnumerable<ThreatList>)

Find Full Hashes Asynchronously.

Declaration
public static Task<FullHashResponse> FindFullHashesAsync(this IBrowsingClient this, string sha256HashPrefix, IEnumerable<ThreatList> threatLists)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

System.String sha256HashPrefix

A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to query.

System.Collections.Generic.IEnumerable<ThreatList> threatLists

A collection of ThreatList the threat identified by sha256HashPrefix is associated with.

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

A FullHashResponse.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

Thrown if this is a null reference, or if sha256HashPrefix is a null reference, or if threatLists is a null reference.

System.ObjectDisposedException

Thrown if the this is disposed.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

FindFullHashesAsync(IBrowsingClient, String, IEnumerable<ThreatList>, CancellationToken)

Find Full Hashes Asynchronously.

Declaration
public static Task<FullHashResponse> FindFullHashesAsync(this IBrowsingClient this, string sha256HashPrefix, IEnumerable<ThreatList> threatLists, CancellationToken cancellationToken)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

System.String sha256HashPrefix

A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat to query.

System.Collections.Generic.IEnumerable<ThreatList> threatLists

A collection of ThreatList the threat identified by sha256HashPrefix is associated with.

System.Threading.CancellationToken cancellationToken

A cancellation token to cancel the asynchronous operation with.

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

A FullHashResponse.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

Thrown if this is a null reference, or if sha256HashPrefix is a null reference, or if threatLists is a null reference.

System.ObjectDisposedException

Thrown if the this is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

GetThreatListDescriptorsAsync(IBrowsingClient)

Get Threat List Descriptors Asynchronously.

Declaration
public static Task<IEnumerable<ThreatListDescriptor>> GetThreatListDescriptorsAsync(this IBrowsingClient this)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ThreatListDescriptor>>

A collection of ThreatListDescriptor.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

Thrown if this is a null reference.

System.ObjectDisposedException

Thrown if this is disposed.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

GetThreatListUpdatesAsync(IBrowsingClient, ThreatListUpdateRequest)

Get Threat List Updates Asynchronously.

Declaration
public static Task<ThreatListUpdateResponse> GetThreatListUpdatesAsync(this IBrowsingClient this, ThreatListUpdateRequest request)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

ThreatListUpdateRequest request

A ThreatListUpdateRequest.

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

A ThreatListUpdateResponse.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

Thrown if this is a null reference, or if request is a null reference.

System.ObjectDisposedException

Thrown if this is disposed.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

GetThreatListUpdatesAsync(IBrowsingClient, ThreatList, ThreatListUpdateConstraints)

Get Threat List Updates Asynchronously.

Declaration
public static Task<ThreatListUpdateResponse> GetThreatListUpdatesAsync(this IBrowsingClient this, ThreatList threatList, ThreatListUpdateConstraints updateConstraints)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

ThreatList threatList

A ThreatList to retrieve.

ThreatListUpdateConstraints updateConstraints

The ThreatListUpdateConstraints to apply when threatList is retrieved. A null reference indicates no ThreatListUpdateConstraints should be applied.

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

A ThreatListUpdateResponse.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

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

System.ObjectDisposedException

Thrown if the this is disposed.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

GetThreatListUpdatesAsync(IBrowsingClient, ThreatList, ThreatListUpdateConstraints, CancellationToken)

Get Threat List Updates Asynchronously.

Declaration
public static Task<ThreatListUpdateResponse> GetThreatListUpdatesAsync(this IBrowsingClient this, ThreatList threatList, ThreatListUpdateConstraints updateConstraints, CancellationToken cancellationToken)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

ThreatList threatList

A ThreatList to retrieve.

ThreatListUpdateConstraints updateConstraints

The ThreatListUpdateConstraints to apply when threatList is retrieved. A null reference indicates no ThreatListUpdateConstraints should be applied.

System.Threading.CancellationToken cancellationToken

A cancellation token to cancel the asynchronous operation with.

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

A ThreatListUpdateResponse.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

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

System.ObjectDisposedException

Thrown if the this is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

GetThreatListUpdatesAsync(IBrowsingClient, IEnumerable<ThreatList>)

Get Threat List Updates Asynchronously.

Declaration
public static Task<ThreatListUpdateResponse> GetThreatListUpdatesAsync(this IBrowsingClient this, IEnumerable<ThreatList> threatLists)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

System.Collections.Generic.IEnumerable<ThreatList> threatLists

A collection of ThreatList to retrieve.

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

A ThreatListUpdateResponse.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

Thrown if this is a null reference, or if threatLists is a null reference.

System.ObjectDisposedException

Thrown if the this is disposed.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

GetThreatListUpdatesAsync(IBrowsingClient, IEnumerable<ThreatList>, CancellationToken)

Get Threat List Updates Asynchronously.

Declaration
public static Task<ThreatListUpdateResponse> GetThreatListUpdatesAsync(this IBrowsingClient this, IEnumerable<ThreatList> threatLists, CancellationToken cancellationToken)
Parameters
Type Name Description
IBrowsingClient this

A IBrowsingClient.

System.Collections.Generic.IEnumerable<ThreatList> threatLists

A 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<ThreatListUpdateResponse>

A ThreatListUpdateResponse.

Exceptions
Type Condition
BrowsingClientException

Thrown if an error communicating with the Google Safe Browsing API occurs.

System.ArgumentNullException

Thrown if this is a null reference, or if threatLists is a null reference.

System.ObjectDisposedException

Thrown if the this is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

System.TimeoutException

Thrown if communication with the Google Safe Browsing API times out.

Back to top Generated by DocFX