Class ThreatListUpdateResultBuilder
Threat List Update Result Builder.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing.Clients
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class ThreatListUpdateResultBuilder
Methods
AddThreatToAdd(String)
Add a Threat to Add.
Declaration
public ThreatListUpdateResultBuilder AddThreatToAdd(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A SHA256 hash prefix, formatted as hexadecimal encoded string, identifying a threat associated with the retrieved ThreatList and should be added to the locally stored copy of the threat list. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
AddThreatToRemove(Int32)
Add a Threat to Remove.
Declaration
public ThreatListUpdateResultBuilder AddThreatToRemove(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | A zero-based index identifying a threat associated with the lexicographically sorted retrieved ThreatList and should be removed from the locally stored copy of the threat list. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if |
Build()
Build a Threat List Update Result.
Declaration
public ThreatListUpdateResult Build()
Returns
Type | Description |
---|---|
ThreatListUpdateResult |
SetQuery(ThreatListUpdateQuery)
Set Query.
Declaration
public ThreatListUpdateResultBuilder SetQuery(ThreatListUpdateQuery value)
Parameters
Type | Name | Description |
---|---|---|
ThreatListUpdateQuery | value | The ThreatListUpdateQuery made to the Google Safe Browsing API for which the threat list update result has been returned. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
SetQuery(Func<ThreatListUpdateQueryBuilder, ThreatListUpdateQuery>)
Set Query.
Declaration
public ThreatListUpdateResultBuilder SetQuery(Func<ThreatListUpdateQueryBuilder, ThreatListUpdateQuery> valueAction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<ThreatListUpdateQueryBuilder, ThreatListUpdateQuery> | valueAction | An action to create the ThreatListUpdateQuery made to the Google Safe Browsing API for which the threat list update result has been returned. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
SetRetrievedThreatList(ThreatList)
Set Retrieved Threat List.
Declaration
public ThreatListUpdateResultBuilder SetRetrievedThreatList(ThreatList value)
Parameters
Type | Name | Description |
---|---|---|
ThreatList | value | The ThreatList retrieved from the Google Safe Browsing API. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
SetRetrievedThreatList(Func<ThreatListBuilder, ThreatList>)
Set Retrieved Threat List.
Declaration
public ThreatListUpdateResultBuilder SetRetrievedThreatList(Func<ThreatListBuilder, ThreatList> valueAction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<ThreatListBuilder, ThreatList> | valueAction | An action to create the ThreatList retrieved from the Google Safe Browsing API. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
SetRetrievedThreatListChecksum(String)
Set Retrieved Threat List's Checksum.
Declaration
public ThreatListUpdateResultBuilder SetRetrievedThreatListChecksum(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The checksum, formatted as a hexadecimal encoded string, of the lexicographically sorted retrieved ThreatList. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
SetThreatsToAdd(IEnumerable<String>)
Set Threats to Add.
Declaration
public ThreatListUpdateResultBuilder SetThreatsToAdd(IEnumerable<string> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | value | A collection of SHA256 hash prefixes, formatted as hexadecimal encoded strings, identifying the threats associated with the retrieved ThreatList and should be added to the locally stored copy of the threat list. An empty collection indicates there are no threats to add. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
SetThreatsToRemove(IEnumerable<Int32>)
Set Threats to Remove.
Declaration
public ThreatListUpdateResultBuilder SetThreatsToRemove(IEnumerable<int> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Int32> | value | A collection of zero-based indices identifying the threats associated with the lexicographically sorted retrieved ThreatList and should be removed from the locally stored copy of the threat list. An empty collection indicates there are no threats to remove. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.ArgumentOutOfRangeException | Thrown if |
SetUpdateType(ThreatListUpdateType)
Set Update Type.
Declaration
public ThreatListUpdateResultBuilder SetUpdateType(ThreatListUpdateType value)
Parameters
Type | Name | Description |
---|---|---|
ThreatListUpdateType | value | An ThreatListUpdateType indicating how the retrieved ThreatList was retrieved. |
Returns
Type | Description |
---|---|
ThreatListUpdateResultBuilder | This threat list update result builder. |