Show / Hide Table of Contents

Class DatabaseLookupResult

Database Lookup Result.

Inheritance
System.Object
DatabaseLookupResult
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.Databases
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class DatabaseLookupResult

Properties

IsDatabaseHit

Determine if DatabaseLookupResult Indicates a Database Hit.

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

Conveniently determines if the DatabaseLookupResult indicates a database hit; that is ResultCode is equal to Hit.

IsDatabaseMiss

Determine if DatabaseLookupResult Indicates a Database Miss.

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

Conveniently determines if the DatabaseLookupResult indicates a database miss; that is ResultCode is equal to Miss.

IsDatabaseStale

Determine if DatabaseLookupResult Indicates a Stale Database.

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

Conveniently determines if the DatabaseLookupResult indicates a stale database; that is ResultCode is equal to Stale.

ResultCode

Get DatabaseLookupResultCode.

Declaration
public DatabaseLookupResultCode ResultCode { get; }
Property Value
Type
DatabaseLookupResultCode
Remarks

Represents the DatabaseLookupResultCode indicating the nature of the DatabaseLookupResult.

Sha256Hash

Get 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 that was looked up in a local database.

Exceptions
Type Condition
System.InvalidOperationException

Thrown if ResultCode is not equal to Hit.

Sha256HashPrefix

Get SHA256 Hash Prefix.

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

Represents the SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a local database.

Exceptions
Type Condition
System.InvalidOperationException

Thrown if ResultCode is not equal to Hit.

ThreatLists

Get Threat Lists.

Declaration
public IEnumerable<ThreatList> ThreatLists { get; }
Property Value
Type
System.Collections.Generic.IEnumerable<ThreatList>
Remarks

Represents the collection of threat lists the threat identified by Sha256Hash and Sha256HashPrefix is associated with if, and only if, ResultCode is equal to Hit.

Exceptions
Type Condition
System.InvalidOperationException

Thrown if ResultCode is not equal to Hit.

Methods

DatabaseHit(String, String, IEnumerable<ThreatList>)

Create a DatabaseLookupResult Indicating a Database Hit.

Declaration
public static DatabaseLookupResult DatabaseHit(string sha256Hash, string sha256HashPrefix, IEnumerable<ThreatList> threatLists)
Parameters
Type Name Description
System.String sha256Hash

A full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a local database.

System.String sha256HashPrefix

A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a local database.

System.Collections.Generic.IEnumerable<ThreatList> threatLists

A collection of threat lists the threat identified by sha256Hash and sha256HashPrefix is associated with.

Returns
Type Description
DatabaseLookupResult

A DatabaseLookupResult indicating a database hit.

DatabaseMiss()

Create a DatabaseLookupResult Indicating a Database Miss.

Declaration
public static DatabaseLookupResult DatabaseMiss()
Returns
Type Description
DatabaseLookupResult

A DatabaseLookupResult indicating a database miss.

DatabaseStale()

Create a DatabaseLookupResult Indicating a Stale Database.

Declaration
public static DatabaseLookupResult DatabaseStale()
Returns
Type Description
DatabaseLookupResult

A DatabaseLookupResult indicating a stale database.

Equals(Object)

Determine if This 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 this object is equal to the 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