Class CacheLookupResult
Cache Lookup Result.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing.Cache
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class CacheLookupResult
Properties
IsCacheMiss
Determine if Cache Lookup Result Indicates a Cache Miss.
Declaration
public bool IsCacheMiss { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the cache lookup result indicates a Miss.
IsCacheSafeHit
Determine if Cache Lookup Result Indicates a Cache Safe Hit.
Declaration
public bool IsCacheSafeHit { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the cache lookup result indicates a SafeHit.
IsCacheUnsafeHit
Determine if Cache Lookup Result Indicates a Cache Unsafe Hit.
Declaration
public bool IsCacheUnsafeHit { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the cache lookup result indicates an UnsafeHit.
ResultCode
Get Result Code.
Declaration
public CacheLookupResultCode ResultCode { get; }
Property Value
Type |
---|
CacheLookupResultCode |
Remarks
Represents the CacheLookupResultCode indicating the nature of the cache lookup result.
ThreatSha256Hash
Get Threat's SHA256 Hash.
Declaration
public string ThreatSha256Hash { 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 IBrowsingCache.
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 looked up in a IBrowsingCache.
UnsafeThreatListDescriptors
Get Unsafe Threat List Descriptors.
Declaration
public IEnumerable<ThreatListDescriptor> UnsafeThreatListDescriptors { get; }
Property Value
Type |
---|
System.Collections.Generic.IEnumerable<ThreatListDescriptor> |
Remarks
Represents the unique collection of ThreatListDescriptor identifying the unique collection of ThreatList the collection of UnsafeThreats is associated with if, and only if, the cache lookup result indicates an UnsafeHit. To determine if the cache lookup result indicates a cache unsafe hit, call IsCacheUnsafeHit.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown if the cache lookup result does not indicate a UnsafeHit. |
UnsafeThreats
Get Unsafe Threats
Declaration
public IEnumerable<UnsafeThreat> UnsafeThreats { get; }
Property Value
Type |
---|
System.Collections.Generic.IEnumerable<UnsafeThreat> |
Remarks
Represents the collection of UnsafeThreat that was retrieved from a IBrowsingCache if, and only if, the cache lookup result indicates an UnsafeHit. To determine if the cache lookup result indicates a cache unsafe hit, call IsCacheUnsafeHit.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown if the cache lookup result does not indicate a UnsafeHit. |
Methods
CacheMiss(String, String)
Create a Cache Result Indicating a Cache Miss.
Declaration
public static CacheLookupResult CacheMiss(string threatSha256Hash, string threatSha256HashPrefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a IBrowsingCache. |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a IBrowsingCache. |
Returns
Type | Description |
---|---|
CacheLookupResult | A cache lookup result indicating a Miss. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
CacheSafeHit(String, String)
Create a Cache Result Indicating a Cache Safe Hit.
Declaration
public static CacheLookupResult CacheSafeHit(string threatSha256Hash, string threatSha256HashPrefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a IBrowsingCache. |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a IBrowsingCache. |
Returns
Type | Description |
---|---|
CacheLookupResult | A cache lookup result indicating a SafeHit. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
CacheUnsafeHit(String, String, IEnumerable<UnsafeThreat>)
Create a Cache Result Indicating a Cache Unsafe Hit.
Declaration
public static CacheLookupResult CacheUnsafeHit(string threatSha256Hash, string threatSha256HashPrefix, IEnumerable<UnsafeThreat> unsafeThreats)
Parameters
Type | Name | Description |
---|---|---|
System.String | threatSha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a IBrowsingCache. |
System.String | threatSha256HashPrefix | A SHA256 hash prefix, formatted as a hexadecimal encoded string, identifying the threat that was looked up in a IBrowsingCache. |
System.Collections.Generic.IEnumerable<UnsafeThreat> | unsafeThreats | A collection of UnsafeThreat that was retrieved from a IBrowsingCache. |
Returns
Type | Description |
---|---|
CacheLookupResult | A cache lookup result indicating a UnsafeHit. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
ToString()
Get Object's String Representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The object's string representation. |