Show / Hide Table of Contents

Class BrowsingDatabaseManagerBuilder

Database Manager Builder.

Inheritance
System.Object
BrowsingDatabaseManagerBuilder
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.Services
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class BrowsingDatabaseManagerBuilder

Methods

Build()

Build a Database Manager.

Declaration
public BrowsingDatabaseManager Build()
Returns
Type Description
BrowsingDatabaseManager

A BrowsingDatabaseManager.

RestrictUpdatesTo(ThreatListDescriptor)

Restrict Updates.

Declaration
public BrowsingDatabaseManagerBuilder RestrictUpdatesTo(ThreatListDescriptor threatListDescriptor)
Parameters
Type Name Description
ThreatListDescriptor threatListDescriptor

A ThreatListDescriptor identifying a ThreatList to restrict updates to.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database synchronizer builder.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if threatListDescriptor is a null reference.

RestrictUpdatesTo(ThreatListDescriptor, ThreatListUpdateConstraints)

Restrict Updates.

Declaration
public BrowsingDatabaseManagerBuilder RestrictUpdatesTo(ThreatListDescriptor threatListDescriptor, ThreatListUpdateConstraints updateConstraints)
Parameters
Type Name Description
ThreatListDescriptor threatListDescriptor

A ThreatListDescriptor identifying a ThreatList to restrict updates to.

ThreatListUpdateConstraints updateConstraints

The ThreatListUpdateConstraints to apply when the ThreatList identified by threatListDescriptor is retrieved.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if threatListDescriptor is a null reference, or if updateConstraints is a null reference.

RestrictUpdatesTo(ThreatListDescriptor, Func<ThreatListUpdateConstraintsBuilder, ThreatListUpdateConstraints>)

Restrict Updates.

Declaration
public BrowsingDatabaseManagerBuilder RestrictUpdatesTo(ThreatListDescriptor threatListDescriptor, Func<ThreatListUpdateConstraintsBuilder, ThreatListUpdateConstraints> updateConstraintsAction)
Parameters
Type Name Description
ThreatListDescriptor threatListDescriptor

A ThreatListDescriptor identifying a ThreatList to restrict updates to.

System.Func<ThreatListUpdateConstraintsBuilder, ThreatListUpdateConstraints> updateConstraintsAction

An action to create the ThreatListUpdateConstraints to apply when the ThreatList identified by threatListDescriptor is retrieved.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if threatListDescriptor is a null reference, or if updateConstraintsAction is a null reference.

RestrictUpdatesTo(ThreatType, PlatformType, ThreatEntryType)

Restrict Updates.

Declaration
public BrowsingDatabaseManagerBuilder RestrictUpdatesTo(ThreatType threatType, PlatformType platformType, ThreatEntryType threatEntryType)
Parameters
Type Name Description
ThreatType threatType

A ThreatType identifying a ThreatList to restrict updates to.

PlatformType platformType

A PlatformType identifying a ThreatList to restrict updates to.

ThreatEntryType threatEntryType

A ThreatEntryType identifying a ThreatList to restrict updates to.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

RestrictUpdatesTo(ThreatType, PlatformType, ThreatEntryType, ThreatListUpdateConstraints)

Restrict Updates.

Declaration
public BrowsingDatabaseManagerBuilder RestrictUpdatesTo(ThreatType threatType, PlatformType platformType, ThreatEntryType threatEntryType, ThreatListUpdateConstraints updateConstraints)
Parameters
Type Name Description
ThreatType threatType

A ThreatType identifying a ThreatList to restrict updates to.

PlatformType platformType

A PlatformType identifying a ThreatList to restrict updates to.

ThreatEntryType threatEntryType

A ThreatEntryType identifying a ThreatList to restrict updates to.

ThreatListUpdateConstraints updateConstraints

The ThreatListUpdateConstraints to apply when the ThreatList identified by threatType, platformType, and threatEntryType is retrieved.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if updateConstraints is a null reference.

RestrictUpdatesTo(ThreatType, PlatformType, ThreatEntryType, Func<ThreatListUpdateConstraintsBuilder, ThreatListUpdateConstraints>)

Restrict Updates.

Declaration
public BrowsingDatabaseManagerBuilder RestrictUpdatesTo(ThreatType threatType, PlatformType platformType, ThreatEntryType threatEntryType, Func<ThreatListUpdateConstraintsBuilder, ThreatListUpdateConstraints> updateConstraintsAction)
Parameters
Type Name Description
ThreatType threatType

A ThreatType identifying a ThreatList to restrict updates to.

PlatformType platformType

A PlatformType identifying a ThreatList to restrict updates to.

ThreatEntryType threatEntryType

A ThreatEntryType identifying a ThreatList to restrict updates to.

System.Func<ThreatListUpdateConstraintsBuilder, ThreatListUpdateConstraints> updateConstraintsAction

An action to create the ThreatListUpdateConstraints to apply when the ThreatList identified by threatType, platformType, and threatEntryType is retrieved.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if updateConstraintsAction is a null reference.

SetClient(IBrowsingClient, Boolean)

Set Client.

Declaration
public BrowsingDatabaseManagerBuilder SetClient(IBrowsingClient value, bool ownClient)
Parameters
Type Name Description
IBrowsingClient value

A IBrowsingClient.

System.Boolean ownClient

A boolean flag indicating whether or not the BrowsingDatabaseManager takes ownership of the client and disposes it when the database manager itself is disposed. If the database manager takes ownership of the client and you reference or dispose the client after you create the database manager, the behavior of the database manager and the client is undefined.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if value is a null reference.

SetDatabase(IManagedBrowsingDatabase, Boolean)

Set Database.

Declaration
public BrowsingDatabaseManagerBuilder SetDatabase(IManagedBrowsingDatabase value, bool ownDatabase)
Parameters
Type Name Description
IManagedBrowsingDatabase value

A IManagedBrowsingDatabase.

System.Boolean ownDatabase

A boolean flag indicating whether or not the BrowsingDatabaseManager takes ownership of the database and disposes it when the database manager itself is disposed. If the database manager takes ownership of the database and you reference or dispose the database after you create the database manager, the behavior of the database manager and the database is undefined.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if value is a null reference.

SetUpdateConstraints(IDictionary<ThreatListDescriptor, ThreatListUpdateConstraints>)

Set Update Constraints.

Declaration
public BrowsingDatabaseManagerBuilder SetUpdateConstraints(IDictionary<ThreatListDescriptor, ThreatListUpdateConstraints> value)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<ThreatListDescriptor, ThreatListUpdateConstraints> value
Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if value is a null reference.

UseHttpClient(String)

Use an HTTP Client.

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

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

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Remarks

Use an HttpBrowsingClient to communicate with the Google Safe Browsing API. The BrowsingDatabaseManager takes ownership of the HTTP client and will dispose it when the database manager itself is disposed.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if apiKey is a null reference.

UseJsonDatabase(String)

Use a JSON Database.

Declaration
public BrowsingDatabaseManagerBuilder UseJsonDatabase(string databaseFilePath)
Parameters
Type Name Description
System.String databaseFilePath

An absolute file path to the database file. If the file does not exist, it will be created.

Returns
Type Description
BrowsingDatabaseManagerBuilder

This database manager builder.

Remarks

Use a ManagedJsonBrowsingDatabase to store threat list updates retrieved from the Google Safe Browsing API. The BrowsingDatabaseManager takes ownership of the JSON database and will dispose it when the database manager itself is disposed.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if databaseFilePath is a null reference.

Back to top Generated by DocFX