Show / Hide Table of Contents

Class ThreatList

Threat List.

Inheritance
System.Object
ThreatList
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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 descriptor is a null reference, or if state is a null reference.

System.FormatException

Thrown if state is not hexadecimal encoded.

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 descriptor is a null reference, or if state is a null reference.

System.FormatException

Thrown if state is not hexadecimal encoded.

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 threatListDescriptor is a null reference, or if threatListState is a null reference.

System.FormatException

Thrown if threatListState is not hexadecimal encoded.

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

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 object. A boolean false otherwise.

Overrides
System.Object.Equals(System.Object)

GetHashCode()

Get Object's Hash Code.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

The object's hash code.

Overrides
System.Object.GetHashCode()

ToString()

Get Object's String Representation.

Declaration
public override string ToString()
Returns
Type Description
System.String

The object's string representation.

Overrides
System.Object.ToString()
Back to top Generated by DocFX