Show / Hide Table of Contents

Class UnsafeThreat

Unsafe Threat.

Inheritance
System.Object
UnsafeThreat
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 UnsafeThreat

Constructors

UnsafeThreat(String, ThreatListDescriptor, DateTime)

Create an Unsafe Threat.

Declaration
public UnsafeThreat(string sha256Hash, ThreatListDescriptor associatedThreatListDescriptor, DateTime expirationDate)
Parameters
Type Name Description
System.String sha256Hash

A full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat.

ThreatListDescriptor associatedThreatListDescriptor

A ThreatListDescriptor identifying the ThreatList the threat is associated with.

System.DateTime expirationDate

The date, in Coordinated Universal Time (UTC), the threat should be considered unsafe to. If the date is not in UTC, it is converted to it.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if sha256Hash is a null reference, or if associatedThreatListDescriptor is a null reference.

System.FormatException

Thrown if sha256Hash is not hexadecimal encoded.

Properties

AssociatedThreatListDescriptor

Get Threat's Associated Threat List Descriptor.

Declaration
public ThreatListDescriptor AssociatedThreatListDescriptor { get; }
Property Value
Type
ThreatListDescriptor
Remarks

Represents the ThreatListDescriptor identifying the ThreatList the threat is associated with.

ExpirationDate

Get Threat's Expiration Date.

Declaration
public DateTime ExpirationDate { get; }
Property Value
Type
System.DateTime
Remarks

Represents the date, in Coordinated Universal Time (UTC), the threat should be considered unsafe to.

Expired

Determine if Threat Has Expired.

Declaration
public bool Expired { get; }
Property Value
Type
System.Boolean
Remarks

Determines if the threat has expired and should no longer be considered unsafe. The threat is expired if ExpirationDate has elapsed.

IsMalware

Determine if Threat is Malware.

Declaration
public bool IsMalware { get; }
Property Value
Type
System.Boolean
Remarks

Determines if the threat is malware. The threat is malware if AssociatedThreatListDescriptor is identified by Malware.

IsPotentiallyHarmfulApplication

Determine if Threat is a Potentially Harmful Application.

Declaration
public bool IsPotentiallyHarmfulApplication { get; }
Property Value
Type
System.Boolean
Remarks

Determines if the threat is a potentially harmful application (PHA). The threat is a PHA if AssociatedThreatListDescriptor is identified by PotentiallyHarmfulApplication.

IsSocialEngineering

Determine if Threat is Social Engineering.

Declaration
public bool IsSocialEngineering { get; }
Property Value
Type
System.Boolean
Remarks

Determines if the threat is social engineering. The threat is social engineering if AssociatedThreatListDescriptor is identified by SocialEngineering.

IsUnwantedSoftware

Determine if Threat is Unwanted Software.

Declaration
public bool IsUnwantedSoftware { get; }
Property Value
Type
System.Boolean
Remarks

Determines if the threat is unwanted software. The threat is unwanted software if AssociatedThreatListDescriptor is identified by UnwantedSoftware.

Metadata

Get Threat's Metadata.

Declaration
public IReadOnlyDictionary<string, string> Metadata { get; set; }
Property Value
Type
System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>
Remarks

Represents the threat's metadata.

Sha256Hash

Get Threat's SHA256 Hash.

Declaration
public string Sha256Hash { get; }
Property Value
Type
System.String
Remarks

Represents the full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat.

Methods

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