EntireX .Net Client Mappings from IDL file (Natural Extract)

Hi all

Is it possible to change the mapping of arrays to Lists instead when generating the .net client from the IDL?

I have a scenario where I am getting a list of Bank names and this is being mapped to string[] in .Net C# for the client file. The problem is that this list can vary and since this client file is creating the stub to use as ref parameters, I can’t really account for a variable array.

I am currently getting an array of 62 items but initialising the array to say 100 items (to try and cater for future additions) results in an index out of bounds exception being thrown meaning I have to initialise the string array variable with either the exact number of items or less…

If it is not possible to change mappings to a List<T>, is there an alternative work around for this?

I am using EntireX 10.5.

The easiest way is to change the Natural subprog parameter with the list to an X-array.
When you extract this IDL you’ll get nice .NET structures automatically.

For instance:
1 BankList (1:*) /*out
2 BankID (N10)
2 BankName (A) dynamic

PS if you haven’t used X-arrays before:
Remember that you have to size the number of elements in the list in the subprog with a
RESIZE ARRAY BankList (1:I) befor you start putting data into the elements :wink:

Hi Finn

Thank you very much! :grimacing:

I will have a chat with the natural programmer to get X-arrays implemented.