PDA

View Full Version : using a string array as an argument to a Managed Code Custom Action



jinkskgpt
10-05-2011, 05:50 PM
I am trying to use a string array as an argument to a Managed Code Custom Action. The Custom Action's Public method gets a list of App Pool Names from the DirectoryServices dll. It then will manually construct a vaild array of these names to place into the empty string in the method signature.

The argument signature portion of the method is as follows (In C# ).:


GetAppPools(out string[] appPoolNames)
Has any one ever done this before?

MichaelU
10-06-2011, 02:28 PM
Supported types have to be constructable from a string argument, so arrays are generally not supported. I would suggest writing a wrapper method which converted from and to a semicolon delimited list as a string, and invoking that method instead.

jinkskgpt
10-06-2011, 05:37 PM
Yes, but I still have to pop each delimited element off to load a List or comboBox Items collection on a custom dialog.
:confused:

MichaelU
10-07-2011, 11:16 AM
Wouldn't that require a second custom action anyway? Why not do all your processing in one action, going directly from your array source to populating the table?