Incorporation of the .NET object model
- Last Updated: April 17, 2023
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
ABL supports access to .NET objects by
essentially incorporating the entire .NET class hierarchy
within the ABL class hierarchy. ABL does this by viewing the .NET root
class, System.Object, as an immediate subclass
of the ABL root class, Progress.Lang.Object. In
this way, every .NET class appears to be a part of the ABL
class hierarchy and functions like an ABL class when referenced
by another ABL class or procedure.
For example, if you reference
the .NET class, System.Windows.Forms.Button,
in an ABL session, ABL shows it to have the following class hierarchy:
|
Thus, any System.Windows.Forms.Button instance
inherits the properties and methods of Progress.Lang.Object.
This means that .NET class instances appear on the ABL session
object chain, and you can manage them in much the same way as ABL
class instances.
System.Object. For more
information, see the sections on data type mapping in Access .NET objects.Similarly, if you derive a .NET class with an ABL class, it appears in the class hierarchy as you might expect:
|
In reality, such an ABL-derived class exists at run time as both an ABL class in the ABL Virtual Machine (AVM) and as a parallel .NET class in the CLR, hence the reference to an ABL-derived .NET class. Also, if you implement one or more .NET interfaces in an ABL class, that ABL class also exists as an ABL extension of a .NET class in both the AVM and CLR. For more information, see GUI for .NET run-time architecture.