Show / Hide Table of Contents

Class SafeCacheEntry

Safe Cache Entry.

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

Constructors

SafeCacheEntry(String, DateTime)

Create a Safe Cache Entry.

Declaration
public SafeCacheEntry(string threatSha256HashPrefix, DateTime expirationDate)
Parameters
Type Name Description
System.String threatSha256HashPrefix

A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying a threat that was retrieved from a IBrowsingCache.

System.DateTime expirationDate

The date, in Coordinated Universal Time (UTC), the safe cache entry expires and the threat identified by threatSha256HashPrefix should be considered safe to. If the date is not in UTC, it is converted to it.

Exceptions
Type Condition
System.ArgumentNullException

Thrown if threatSha256HashPrefix is a null reference.

System.FormatException

Thrown if threatSha256HashPrefix is not formatted as a hexadecimal encoded string.

Properties

ExpirationDate

Get Safe Cache Entry's Expiration Date.

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

Represents the date, in Coordinated Universal Time (UTC), the safe cache entry expires and the threat identified by ThreatSha256HashPrefix should be considered safe to.

Expired

Determine if Safe Cache Entry Has Expired.

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

Determines if the safe cache entry has expired and the threat identified by ThreatSha256HashPrefix should no longer be considered safe.

ThreatSha256HashPrefix

Get Threat's SHA256 Hash Prefix.

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

Represents the SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying the threat that was retrieved from a IBrowsingCache.

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