Table of Contents

Struct ScanRate

Namespace
L5Sharp.Common
Assembly
L5Sharp.dll

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 float

The 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 ScanRate

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The 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 string

The string to parse.

Returns

ScanRate

A ScanRate value if the parse was successful; otherwise; the default value.

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

left ScanRate

An object to compare.

right ScanRate

An object to compare.

Returns

bool

true if the provided objects are equal; otherwise, false.

implicit operator float(ScanRate)

Converts a ScanRate to a float.

public static implicit operator float(ScanRate rate)

Parameters

rate ScanRate

The value to convert.

Returns

float

A float value.

implicit operator ScanRate(float)

Converts a float to a ScanRate.

public static implicit operator ScanRate(float rate)

Parameters

rate float

The value to convert.

Returns

ScanRate

A ScanRate value.

operator !=(ScanRate, ScanRate)

Determines if the provided objects are not equal.

public static bool operator !=(ScanRate left, ScanRate right)

Parameters

left ScanRate

An object to compare.

right ScanRate

An object to compare.

Returns

bool

true if the provided objects are not equal; otherwise, false.