Class FullHashResponse
Full Hash Response.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing.Clients
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class FullHashResponse
Constructors
FullHashResponse(FullHashRequest, DateTime, IEnumerable<UnsafeThreat>, Nullable<DateTime>)
Create a Full Hash Response.
Declaration
public FullHashResponse(FullHashRequest request, DateTime safeThreatsExpirationDate, IEnumerable<UnsafeThreat> unsafeThreats, DateTime? waitToDate)
Parameters
Type | Name | Description |
---|---|---|
FullHashRequest | request | The FullHashRequest made to the Google Safe Browsing API for which the full hash response has been returned. |
System.DateTime | safeThreatsExpirationDate | The date, in Coordinated Universal Time (UTC), safe threats should be considered safe to. If the date is not in UTC, it is converted to it. |
System.Collections.Generic.IEnumerable<UnsafeThreat> | unsafeThreats | A collection of UnsafeThreat. A null reference indicates no threats were determined to be unsafe. |
System.Nullable<System.DateTime> | waitToDate | The date, in Coordinated Universal Time (UTC), a client must wait to before issuing another FullHashRequest to the Google Safe Browsing API. If the date is not in UTC, it is converted to it. A null reference indicates a client does not have to wait. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
Properties
Request
Get Request.
Declaration
public FullHashRequest Request { get; }
Property Value
Type |
---|
FullHashRequest |
Remarks
Represents the FullHashRequest made to the Google Safe Browsing API for which the full hash response has been returned.
SafeThreatsExpirationDate
Get Safe Threats Expiration Date.
Declaration
public DateTime SafeThreatsExpirationDate { get; }
Property Value
Type |
---|
System.DateTime |
Remarks
Represents the date, in Coordinated Universal Time (UTC), safe threats should be considered safe to.
SafeThreatsExpired
Determine if Safe Threats Have Expired.
Declaration
public bool SafeThreatsExpired { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if safe threats have expired and should no longer be considered safe.
UnsafeThreats
Get Unsafe Threats.
Declaration
public IReadOnlyCollection<UnsafeThreat> UnsafeThreats { get; }
Property Value
Type |
---|
System.Collections.Generic.IReadOnlyCollection<UnsafeThreat> |
Remarks
Represents the collection of UnsafeThreat. An empty collection indicates no threats were determined to be unsafe.
WaitToDate
Get 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 issuing another FullHashRequest to the Google Safe Browsing API. A null reference indicates a client does not have to wait.
Methods
Build()
Build a Full Hash Response.
Declaration
public static FullHashResponseBuilder Build()
Returns
Type | Description |
---|---|
FullHashResponseBuilder | A FullHashResponseBuilder to build a full hash response with. |
GetThreatState(String)
Get a Threat's State.
Declaration
public ThreatState GetThreatState(string sha256Hash)
Parameters
Type | Name | Description |
---|---|---|
System.String | sha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying a threat. |
Returns
Type | Description |
---|---|
ThreatState | A ThreatState indicating the state of the threat identified by
|
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |