Struct TaskPriority
A configurable property of a Task that controls the order in which the Logix Controller will scan the given Task.
public readonly struct TaskPriority : IEquatable<TaskPriority>
- Implements
- Inherited Members
Remarks
TaskPriority is a simple byte value that must be between 1 and 15. Attempting to set the TaskPriority to a value outside that range will result in an ArgumentOutOfRangeException. This parameter will control the scan order of task components as related to other tasks.
Constructors
TaskPriority(byte)
Creates a new instance of TaskPriority with the provided value.
public TaskPriority(byte priority)
Parameters
priority
byteThe value of the priority. Must be a value between 1 and 15.
Exceptions
- ArgumentOutOfRangeException
priority is less than 1 -or- greater than 15.
Methods
Equals(TaskPriority)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(TaskPriority other)
Parameters
other
TaskPriorityAn 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 TaskPriority.
public static TaskPriority Parse(string str)
Parameters
str
stringThe string to parse.
Returns
- TaskPriority
A TaskPriority 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 ==(TaskPriority, TaskPriority)
Determines if the provided objects are equal.
public static bool operator ==(TaskPriority left, TaskPriority right)
Parameters
left
TaskPriorityAn object to compare.
right
TaskPriorityAn object to compare.
Returns
- bool
true if the provided objects are equal; otherwise, false.
implicit operator byte(TaskPriority)
Converts a TaskPriority to a byte.
public static implicit operator byte(TaskPriority priority)
Parameters
priority
TaskPriorityThe value to convert.
Returns
implicit operator TaskPriority(byte)
Converts a byte to a TaskPriority.
public static implicit operator TaskPriority(byte priority)
Parameters
priority
byteThe value to convert.
Returns
- TaskPriority
A TaskPriority value.
operator !=(TaskPriority, TaskPriority)
Determines if the provided objects are not equal.
public static bool operator !=(TaskPriority left, TaskPriority right)
Parameters
left
TaskPriorityAn object to compare.
right
TaskPriorityAn object to compare.
Returns
- bool
true if the provided objects are not equal; otherwise, false.