This version primarily focuses on reworking the concept of element Scope and how the Lookup/Index API works.
Scope was added as a complex class that contains all the information regarding the location of a given element in the L5X tree.
Scope includes the Controller name, Program and Routine name (when applicable), element Type, and element Name (or number in the case of code elements like rung). Therefore, Scope can be viewed as a sort of URI for an element.
Scope replaces ComponentKey for components and is also no longer exclusive to just components, but also to LogixCode elements as well.
The old Scope enum is now called ScopeLevel and instead of Instruction scope there is Routine scope.
ScopeType enum was added to identify the types of elements we are considering valid scope elements.
The internal LogixIndex class was reworked to support Scope.
This also led to redefining of the lookup API. I created a new interface called ILogixLookup which defines the API.
L5XOptions were added to allow user to specify if they want to index the file on load or not. If not the default is to use XPath lookup and not dictionary lookup which is less efficient.
CrossReference was reworked to use Scope, TagName, and Instruction only.
This version primarily focuses on reworking the concept of element Scope and how the Lookup/Index API works.
Scope
was added as a complex class that contains all the information regarding the location of a given element in the L5X tree.Scope
includes theController
name,Program
andRoutine
name (when applicable), elementType
, and elementName
(or number in the case of code elements like rung). Therefore, Scope can be viewed as a sort of URI for an element.ComponentKey
for components and is also no longer exclusive to just components, but also toLogixCode
elements as well.ScopeLevel
and instead ofInstruction
scope there isRoutine
scope.ScopeType
enum was added to identify the types of elements we are considering valid scope elements.LogixIndex
class was reworked to support Scope.ILogixLookup
which defines the API.L5XOptions
were added to allow user to specify if they want to index the file on load or not. If not the default is to use XPath lookup and not dictionary lookup which is less efficient.CrossReference
was reworked to use Scope, TagName, and Instruction only.