Class ThreatList
Threat List.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class ThreatList
Remarks
Represents a threat list retrieved from the Google Safe Browsing API. A threat list is identified using a ThreatType, which indicates the nature of its associated threats, a PlatformType, which indicates the platform its associated threats target, and a ThreatEntryType, which indicates how its associated threats is posed.
Constructors
ThreatList(ThreatListDescriptor, String, DateTime)
Create a Threat List.
Declaration
public ThreatList(ThreatListDescriptor descriptor, string state, DateTime retrieveDate)
Parameters
Type | Name | Description |
---|---|---|
ThreatListDescriptor | descriptor | A ThreatListDescriptor identifying the threat list. |
System.String | state | The state, formatted as a hexadecimal encoded string, of the threat list when it was retrieved from the Google Safe Browsing API. |
System.DateTime | retrieveDate | The date, in Coordinated Universal Time (UTC), the threat list was retrieved from the Google Safe Browsing API. If the date is not expressed in UTC, it is converted to it. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
ThreatList(ThreatListDescriptor, String, DateTime, Nullable<DateTime>)
Create a Threat List.
Declaration
public ThreatList(ThreatListDescriptor descriptor, string state, DateTime retrieveDate, DateTime? waitToDate)
Parameters
Type | Name | Description |
---|---|---|
ThreatListDescriptor | descriptor | A ThreatListDescriptor identifying the threat list. |
System.String | state | The state, formatted as a hexadecimal encoded string, of the threat list when it was retrieved from the Google Safe Browsing API. |
System.DateTime | retrieveDate | The date, in Coordinated Universal Time (UTC), the threat list was retrieved from the Google Safe Browsing API. If the date is not expressed in UTC, it is converted to it. |
System.Nullable<System.DateTime> | waitToDate | The date, in Coordinated Universal Time (UTC), a client must wait to before retrieving the threat list from the Google Safe Browsing API again. If the date is not expressed in UTC, it is converted to it. A null reference indicates a client does not need to wait before retrieving the threat list from the Google Safe Browsing API again. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
Properties
Descriptor
Get Threat List's Descriptor.
Declaration
public ThreatListDescriptor Descriptor { get; }
Property Value
Type |
---|
ThreatListDescriptor |
Remarks
Represents the ThreatListDescriptor identifying the threat list.
Expired
Determine if Threat List Has Expired.
Declaration
public bool Expired { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat list has expired and should be retrieved from the Google Safe Browsing API again.
IsMalwareList
Determine if Threat List is a Malware List.
Declaration
public bool IsMalwareList { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat list is a Malware list.
IsPotentiallyHarmfulApplicationList
Determine if Threat List is a Potentially Harmful Application List.
Declaration
public bool IsPotentiallyHarmfulApplicationList { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat list is a PotentiallyHarmfulApplication (PHA) list.
IsSocialEngineeringList
Determine if Threat List is a Social Engineering List.
Declaration
public bool IsSocialEngineeringList { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat list is a SocialEngineering list.
IsUnwantedSoftwareList
Determine if Threat List is an Unwanted Software List.
Declaration
public bool IsUnwantedSoftwareList { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat list is an UnwantedSoftware list.
RetrieveDate
Get Threat List's Retrieve Date.
Declaration
public DateTime RetrieveDate { get; }
Property Value
Type |
---|
System.DateTime |
Remarks
Represents the date, in Coordinated Universal Time (UTC), the threat list was retrieved from the Google Safe Browsing API.
State
Get Threat List's State.
Declaration
public string State { get; }
Property Value
Type |
---|
System.String |
Remarks
Represents the state, formatted as a hexadecimal encoded string, of the threat list when it was retrieved from the Google Safe Browsing API.
WaitToDate
Get Threat List's Wait to Date.
Declaration
public DateTime? WaitToDate { get; }
Property Value
Type |
---|
System.Nullable<System.DateTime> |
Remarks
Represents the date, in Coordinated Universal Time (UTC), a client must wait to before retrieving the threat list from the Google Safe Browsing API again. A null reference indicates a client does not need to wait before retrieving the threat list from the Google Safe Browsing API again.
Methods
Build()
Build a Threat List.
Declaration
public static ThreatListBuilder Build()
Returns
Type | Description |
---|---|
ThreatListBuilder | A ThreatListBuilder to build a threat list with. |
CreateExpired(ThreatListDescriptor, String)
Create an Expired Threat List.
Declaration
public static ThreatList CreateExpired(ThreatListDescriptor threatListDescriptor, string threatListState)
Parameters
Type | Name | Description |
---|---|---|
ThreatListDescriptor | threatListDescriptor | A ThreatListDescriptor identifying the threat list. |
System.String | threatListState | The state, formatted as a hexadecimal encoded string, of the threat list when it was retrieved from the Google Safe Browsing API. |
Returns
Type | Description |
---|---|
ThreatList | An expired threat list. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
CreateInvalid(ThreatListDescriptor)
Create an Invalid Threat List.
Declaration
public static ThreatList CreateInvalid(ThreatListDescriptor threatListDescriptor)
Parameters
Type | Name | Description |
---|---|---|
ThreatListDescriptor | threatListDescriptor | A ThreatListDescriptor identifying the threat list. |
Returns
Type | Description |
---|---|
ThreatList | An invalid threat list. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
Equals(Object)
Determine if Object is Equal to Another Object.
Declaration
public override bool Equals(object object)
Parameters
Type | Name | Description |
---|---|---|
System.Object | object | An object to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean true if the object is equal to |
Overrides
GetHashCode()
Get Object's Hash Code.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The object's hash code. |
Overrides
ToString()
Get Object's String Representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The object's string representation. |