clement-brodu / PCTTools

Library to provide additional tools to PCT
MIT License
0 stars 1 forks source link

fix methods with ref parameters #6

Closed clement-brodu closed 7 months ago

clement-brodu commented 7 months ago

ref parameters (aka INPUT-OUTPUT in Openedge) are not visible in the json :

public string GetMyPropertyWithInputOutput(int hello, ref string name, out string othername)

Openedge equivalent

METHOD PUBLIC CHARACTER GetMyPropertyWithInputOutput (INPUT hello AS INTEGER, INPUT-OUTPUT name AS CHARACTER,  OUTPUT othername AS CHARACTER)
        {
          "name": "GetMyPropertyWithInputOutput",
          "returnType": "CHARACTER",
          "parameters": [
            {
              "name": "hello",
              "type": "INTEGER"
            },
            {
              "name": "name",
              "type": "System.String"
            },
            {
              "isOut": true,
              "name": "othername",
              "type": "System.String"
            }
          ]
        },

@gquerret , any preference for the INPUT-OUTPUT ?

            {
              "isInputOutput": true, // true if input-output 
              "isOut": false, // true if output
              "name": "othername",
              "type": "System.String"
            }

or

            {
              "mode": "IO" // I for input or O for output or IO for input-output (default to "I")
              "name": "othername",
              "type": "System.String"
            }

or

            {
              "mode": "INPUT-OUTPUT" // explicit openedge keyword
              "name": "othername",
              "type": "System.String"
            }
gquerret commented 7 months ago

I'd go for "mode"="IO".

clement-brodu commented 7 months ago

fixed in 1.0.3

schemaVersion is still 1 because it is not in production yet 😉