In the signature of a JADE method, the type of each parameter must be declared along with the Usage value, which can be Usage.Constant, Usage.Input, Usage.IO (combination of input and output), or Usage.Output.
If you do not specify a usage, a default of Usage.Constant is assumed.
The parameter usages are as follows.
For Usage.Constant and Usage.Input parameters, the parameter value specified in the method call is passed to the corresponding parameter in the called method.
You cannot assign to a Usage.Constant or Usage.Input parameter.
For Usage.Output parameters, the value is passed in the reverse direction, from the parameter of the called method back to the corresponding parameter of the caller. This copying back of the parameter value occurs when the called method returns.
For Usage.IO parameters, the parameter value is passed in both directions, as follows.
From the caller to the called method when the method begins
From the called method back to the caller when it returns
The following is an example of an exposed JADE method.
[JadeSoftware.Joob.Client.JoobMethodAttribute("addIntegers")] public Int32 AddIntegers(Int32 i1, Int32 i2) { using (JadeParam retnParam = new JadeParamInteger(Usage.Output), jadeParam1 = new JadeParamInteger(i1), jadeParam2 = new JadeParamInteger(i2)) { this.SendMessage(_metaModel.addIntegers, retnParam, jadeParam1, jadeParam2); return (retnParam as JadeParamInteger).Value; } }