Question .NET delegates in progress 4GL/openedge

anve

New Member
We have seen in the documentation that .NET delegates are not supported in progress.
Source: OpenEdge 11.7 Documentation

But is there another possible way to convert this line of C# code to working progress code ?

C# code:
C#:
ldapConnection.SessionOptions.VerifyServerCertificate = new VerifyServerCertificateCallback((con, cert) => true);

Progress code:

Code:
IF (isSecure = TRUE) THEN DO:
    ldapconn:SessionOptions:SecureSocketLayer = TRUE.
    //ldapconn:SessionOptions:VerifyServerCertificate:SUBSCRIBE(THIS-OBJECT, 'CertificateCheck':U).
    ldapconn:SessionOptions:VerifyServerCertificate = ?. // call to CertificateCheck
END.

METHOD PUBLIC LOGICAL CertificateCheck (INPUT connection AS LdapConnection, INPUT certificate AS X509Certificate):
    RETURN TRUE.
END METHOD.

What must be come there then in the IF ?
 
Last edited:

Osborne

Active Member
I am sure there is an article about this somewhere but cannot find it.

If I remember correctly, the solution was to implement the delegate in a custom C# class, build the C# code into a .NET assembly, add the .NET assembly to your projects assemblies.xml file and use as you would normal as a .NET class.
 
Top