Class ManagedBrowsingServiceBuilder
Managed Service Builder.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing.Services
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class ManagedBrowsingServiceBuilder : BaseBrowsingServiceBuilder<ManagedBrowsingServiceBuilder>
Methods
Build()
Build a Managed Service.
Declaration
public ManagedBrowsingService Build()
Returns
Type | Description |
---|---|
ManagedBrowsingService |
RestrictUpdatesTo(ThreatListDescriptor)
Restrict Updates.
Declaration
public ManagedBrowsingServiceBuilder RestrictUpdatesTo(ThreatListDescriptor threatListDescriptor)
Parameters
Type | Name | Description |
---|---|---|
ThreatListDescriptor | threatListDescriptor | A ThreatListDescriptor identifying a ThreatList to restrict updates to. |
Returns
Type | Description |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
RestrictUpdatesTo(ThreatListDescriptor, ThreatListUpdateConstraints)
Restrict Updates.
Declaration
public ManagedBrowsingServiceBuilder 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 |
Returns
Type | Description |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
RestrictUpdatesTo(ThreatListDescriptor, Func<ThreatListUpdateConstraintsBuilder, ThreatListUpdateConstraints>)
Restrict Updates.
Declaration
public ManagedBrowsingServiceBuilder 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 |
Returns
Type | Description |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
RestrictUpdatesTo(ThreatType, PlatformType, ThreatEntryType)
Restrict Updates.
Declaration
public ManagedBrowsingServiceBuilder 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 |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
RestrictUpdatesTo(ThreatType, PlatformType, ThreatEntryType, ThreatListUpdateConstraints)
Restrict Updates.
Declaration
public ManagedBrowsingServiceBuilder 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 |
Returns
Type | Description |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
RestrictUpdatesTo(ThreatType, PlatformType, ThreatEntryType, Func<ThreatListUpdateConstraintsBuilder, ThreatListUpdateConstraints>)
Restrict Updates.
Declaration
public ManagedBrowsingServiceBuilder 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 |
Returns
Type | Description |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
SetDatabase(IManagedBrowsingDatabase, Boolean)
Set Database.
Declaration
public ManagedBrowsingServiceBuilder SetDatabase(IManagedBrowsingDatabase value, bool ownDatabase)
Parameters
Type | Name | Description |
---|---|---|
IManagedBrowsingDatabase | value | A IManagedBrowsingDatabase to store the collection of retrieved ThreatList in. |
System.Boolean | ownDatabase | A boolean flag indicating whether or not the ManagedBrowsingService takes ownership of the database and disposes it when the managed service itself is disposed. If the managed service takes ownership of the database and you reference or dispose the database after you create the managed service, the behavior of the managed service and the database is undefined. |
Returns
Type | Description |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
UseJsonDatabase(String)
Use a JSON Database.
Declaration
public ManagedBrowsingServiceBuilder 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 |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
Remarks
Use a ManagedJsonBrowsingDatabase to store threat list updates retrieved from the Google Safe Browsing API. The ManagedBrowsingService takes ownership of the JSON database and will dispose it when the managed service itself is disposed.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
UseMemoryDatabase()
Use a Memory Database.
Declaration
public ManagedBrowsingServiceBuilder UseMemoryDatabase()
Returns
Type | Description |
---|---|
ManagedBrowsingServiceBuilder | This managed service builder. |
Remarks
Use a MemoryBrowsingDatabase to store threat list updates retrieved from the Google Safe Browsing API. The ManagedBrowsingService takes ownership of the memory database and will dispose it when the managed service itself is disposed.