Show / Hide Table of Contents

Class HttpBrowsingClient

HTTP Client.

Inheritance
System.Object
HttpBrowsingClient
Implements
IBrowsingClient
System.IDisposable
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.Http
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class HttpBrowsingClient : IBrowsingClient, IDisposable

Constructors

HttpBrowsingClient(String)

Create a Browsing Client.

Declaration
public HttpBrowsingClient(string apiKey)
Parameters
Type Name Description
System.String apiKey

A Google Safe Browsing API key to authenticate to the Google Safe Browsing API with.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if apiKey is a null reference.

Methods

Dispose()

Dispose Object.

Declaration
public void Dispose()

FindFullHashesAsync(FullHashRequest, CancellationToken)

Find Full Hashes Asynchronously.

Declaration
public Task<FullHashResponse> FindFullHashesAsync(FullHashRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
FullHashRequest request

A FullHashRequest.

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 request is a null reference.

System.ObjectDisposedException

Thrown if the object 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(CancellationToken)

Get Threat List Descriptors Asynchronously.

Declaration
public Task<IEnumerable<ThreatListDescriptor>> GetThreatListDescriptorsAsync(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.IEnumerable<ThreatListDescriptor>>

A collection of ThreatListDescriptor.

Exceptions
Type Condition
BrowsingClientException

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

System.ObjectDisposedException

Thrown if the object 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(ThreatListUpdateRequest, CancellationToken)

Get Threat List Updates Asynchronously.

Declaration
public Task<ThreatListUpdateResponse> GetThreatListUpdatesAsync(ThreatListUpdateRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
ThreatListUpdateRequest request

A ThreatListUpdateRequest.

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 request is a null reference.

System.ObjectDisposedException

Thrown if the object is disposed.

System.OperationCanceledException

Thrown if the asynchronous operation is cancelled.

System.TimeoutException

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

Implements

IBrowsingClient
System.IDisposable

Extension Methods

BrowsingClientExtension.FindFullHashesAsync(IBrowsingClient, FullHashRequest)
BrowsingClientExtension.FindFullHashesAsync(IBrowsingClient, String, IEnumerable<ThreatList>)
BrowsingClientExtension.FindFullHashesAsync(IBrowsingClient, String, IEnumerable<ThreatList>, CancellationToken)
BrowsingClientExtension.GetThreatListDescriptorsAsync(IBrowsingClient)
BrowsingClientExtension.GetThreatListUpdatesAsync(IBrowsingClient, ThreatListUpdateRequest)
BrowsingClientExtension.GetThreatListUpdatesAsync(IBrowsingClient, IEnumerable<ThreatList>)
BrowsingClientExtension.GetThreatListUpdatesAsync(IBrowsingClient, IEnumerable<ThreatList>, CancellationToken)
BrowsingClientExtension.GetThreatListUpdatesAsync(IBrowsingClient, ThreatList, ThreatListUpdateConstraints)
BrowsingClientExtension.GetThreatListUpdatesAsync(IBrowsingClient, ThreatList, ThreatListUpdateConstraints, CancellationToken)
Back to top Generated by DocFX