Struct ScanRate
A configurable property of a Task that controls the rate at which the task will be evaluated or scanned.
public readonly struct ScanRate : IEquatable<ScanRate>
- Implements
- Inherited Members
Remarks
ScanRate is a simple float value that must be between 0.1 and 2,000,000.0ms. Attempting to set the ScanRate to a value outside that range will result in an ArgumentOutOfRangeException. This parameter will control the rate at which the Task component is scanned.
Constructors
ScanRate(float)
Creates a new instance of ScanRate with the specified rate value.
public ScanRate(float rate)
Parameters
rate
floatThe scan rate value in milliseconds. Valid range is between 0.1 and 2M
Exceptions
- ArgumentOutOfRangeException
Throw when the provided rate is outside the specified range
Methods
Equals(ScanRate)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ScanRate other)
Parameters
other
ScanRateAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Parse(string)
Parses a string value into a ScanRate.
public static ScanRate Parse(string str)
Parameters
str
stringThe string to parse.
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(ScanRate, ScanRate)
Determines if the provided objects are equal.
public static bool operator ==(ScanRate left, ScanRate right)
Parameters
Returns
- bool
true if the provided objects are equal; otherwise, false.
implicit operator float(ScanRate)
public static implicit operator float(ScanRate rate)
Parameters
rate
ScanRateThe value to convert.
Returns
implicit operator ScanRate(float)
public static implicit operator ScanRate(float rate)
Parameters
rate
floatThe value to convert.
Returns
operator !=(ScanRate, ScanRate)
Determines if the provided objects are not equal.
public static bool operator !=(ScanRate left, ScanRate right)
Parameters
Returns
- bool
true if the provided objects are not equal; otherwise, false.