Use OpenEdge holder classes
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
In ProxyGen, if you specify that a supported value type
parameter or return value can have the Unknown value (?), and
you have chosen to use holder classes, the method is defined with
the corresponding holder class; otherwise the parameter is defined
using the .NET value type.
The following is an example of a C# proxy method signature that
does not support Unknown value (?) for the first and third parameters:
|
The following is an example of a C# proxy method that allows
all the parameter values to have Unknown value (?), using holder
classes where necessary:
|
For each ABL data type that maps to a .NET value type,
there is a Holder class. These Holder classes belong
to the Progress.Open4GL namespace and extend the Progress.Open4GL.Holder class,
as shown in the following table.
| Class | Constructors | Property |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The property specified in the above table allows you to set and
get a value with the .NET value type for which it is defined.
These classes all contain two additional properties that allow you
to set and test for null:
-
Value— To which you can set or getnull, which corresponds to setting or getting theUnknown value (?)for an ABL primitive type. -
isNull— ASystem.Booleanproperty that returns true if theValueproperty of the holder class is set tonull.
The following table shows ABL primitive types that have a default .NET value-type
mapping that cannot accept Unknown value (?). To accept
the Unknown value (?), these ABL primitive types are mapped
to holder classes in the Progress.Open4GL namespace,
as shown in the table.
| This ABL primitive type... | Maps to this holder class... |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|