[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Translate some Visual Studio code

Status
Not open for further replies.
J

jquerijero

Guest
Now understand, Invoke is actually trying to call HandlePayment on all available matching extensions. I don't think this is translatable to ABL. The code I posted will not work; it's for a different purpose. Specially this line will not translate: ExtensionManager.Instance.Invoke(Of IPaymentHandlerExtension)(Sub(x) x.HandlePayment(paymentId, amount, comment)) because Sub(x) x.HandlePayment(paymentId, amount, comment) is an inline delegate definition. The key is re-implementing Invoke to not use delegate. Basically, Invoke should look something like this; Invoke(paymentId, amount, comment) ... You might need to iterate through all the extension and see which extension implements HandlePayment by checking if TYPE-OF is IPaymentHandlerExtension.

Continue reading...
 
Status
Not open for further replies.
Top