Automating C# Exposure Generation and Extraction

You can use the jadclient non-GUI client application to automate the generation and extraction of an existing C# exposure, passing command line arguments after the startAppParameters parameter to specify your generate and extract requirements. For details about:

To generate and extract an existing C# exposure as a non-GUI application, specify the following parameters in the jadclient program command line. The parameters following startAppParameters must be specified in the following order. (Parameters within brackets ([]) are optional.)

jadclient schema=JadeSchema 
          app=CSharpGenerator 
          path=database-path 
          ini=JADE-initialization-file-path-and name
          startAppParameters
          schemaName=top‑most‑schema‑in‑which‑classes‑defined
          exposureName=existing‑exposure‑name
          outputFolderName=absolute‑path‑and‑name‑of‑output‑directory 
         [shouldGenerateProjFile=true] 
         [shouldGenerateAppConfigFile=true 
          dataSourceConfigParam=absolute‑path‑of‑the‑database‑control‑file 
          configFileConfigParam=name‑and‑path‑of‑JADE‑initialization‑file 
          singleUserConfigParam=true|false 
          schemaConfigParam=name‑of‑user‑defined‑schema‑in‑the‑database
         [applicationConfigParam=an‑application‑defined‑in‑schemaName‑parameter]]

The parameters that you can specify after the startAppParameters parameter are listed in the following table in the order in which they must be specified.

Parameter Description
schemaName Name of the highest schema in the hierarchy whose classes are to be included in the C# exposure generation
exposureName Name your existing C# exposure
outputFolderName

Name and absolute path of the directory to which the C# classes will be written

[shouldGenerateProjFile]

False, if you do not want a sample .csproj file generated

[shouldGenerateAppConfigFile

False, if you do not want a sample .config file generated

dataSourceConfigParam Absolute path of the folder containing the database control file (_control.datpath, when the shouldGenerateAppConfigFile parameter is specified with a value of true
configFileConfigParam

Name and absolute path of the JADE initialization file, when the shouldGenerateAppConfigFile parameter is specified with a value of true

singleUserConfigParam

True or false (the default value), to indicate if you want to sign on to the JADE database in single user mode or multiuser mode, respectively, when the shouldGenerateAppConfigFile parameter is specified with a value of true

schemaConfigParam Name of the user‑defined schema in the database
[applicationConfigParam]]

Optionally specifies the name of the default application in the database specified in the schemaName parameter (defaults to RootSchemaApp), when the shouldGenerateAppConfigFile parameter is specified with a value of true

The following is an example of the jadclient command line that generates and extracts a C# exposure.

jadclient schema=JadeSchema app=CSharpGenerator path=c:\jade\system ini=c:\jade\system\jade.ini startAppParameters schemaName=ErewhonInvestmentsModelSchema exposureName=DocCsharpExample outputFolderName=c:\jade\csharp shouldGenerateProjFile=true shouldGenerateAppConfigFile=true dataSourceConfigParam=c:\jade\system configFileConfigParam=c:\jade\system\jade.ini singleUserConfigParam=false schemaConfigParam=DocCsharpDemoSchema applicationConfigParam=CsharpConnectionApp

When specifying C# generate and extract parameters:

You cannot use the jadclient program to automate the generation and extraction of C# files from a deployed environment, as the internal system-only JadeSchema schema from which batch generate and extract actions are run is not present in deployed databases.