Table of Contents

Struct TaskPriority

Namespace
L5Sharp.Common
Assembly
L5Sharp.dll

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 byte

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

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 TaskPriority.

public static TaskPriority Parse(string str)

Parameters

str string

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

An object to compare.

right TaskPriority

An 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 TaskPriority

The value to convert.

Returns

byte

A byte value.

implicit operator TaskPriority(byte)

Converts a byte to a TaskPriority.

public static implicit operator TaskPriority(byte priority)

Parameters

priority byte

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

An object to compare.

right TaskPriority

An object to compare.

Returns

bool

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