The Function element contains instructions for wrapping a single add-in function. These instructions will enrich or override the data in the model file. The attributes of the function element are summarized below.
The element can also contain any number of Argument elements and, optionally, an ErrorPrefixes element.
Child elements
Element | Required | Description |
---|---|---|
ErrorPrefixes | Optional | The ErrorPrefixes element contains the error prefixes to be used for this add-in function only. If the ErrorPrefixes element is omitted, then the default prefixes specified for the XllWrapper will be used. |
Argument | Optional | An Argument element is an optional element which controls the wrapping of a single named argument. |
Attributes
Attribute | Required | Description | Example(s) |
---|---|---|---|
ExportedName | Required | The name of the function, as it appears in the model file. | NORMSINV2 |
Wrap | Optional | One of: Always, Never, Default. Controls whether the specified function will be wrapped. If omitted, Default will be assumed. |
Always Never Default |
ReturnType | Optional | The expected return type of the add-in function. This should be a C# scalar type or array type. |
string double[] int[,] |
WrappedName | Optional | The name of the function as it will appear in the wrapper method. | NormsInv2 |
NoExceptionOnError | Optional | If 0 or omitted, then an exception will be thrown if the function returns either an error value or a string beginning with one of the specified ErrorPrefixes. If 1, then an error value will be returned as a COM error value. | 0 1 |