After developing the mobile business objects (MBOs), generate the .cs files that implement the business logic and are required for Windows and Windows Mobile development.
Option | Description |
---|---|
Language | Select C#. |
Platform | Select the platform ( target device) from the drop-down list for which the device client code is intended.
|
Unwired Server | Specify a default Unwired Server connection profile to which the generated code connects at runtime. |
Server domain | Choose the domain to which the generated code will connect. If you specified an Unwired Server to which you previously connected successfully, the first domain in the list is chosen by default. You can enter a different domain manually. |
Page size | Optionally, select the page size for the generated client code. If the page size is not set, the default page size is 16k at runtime. The page size should be larger than the sum of maximum length of all the attributes of the MBO. The page size must be valid for the database. Note: The page size option is not enabled for message-based applications.
|
Namespace |
Enter a namespace for C#.
Note: The namespace name should follow naming conventions for C#. Do not use ".com" in the namespace.
|
Destination | Specify the destination of the generated device client files. Enter (or Browse) to either a Project path (Mobile Application project) location or File system path location. Select Clean up destination before code generation to clean up the destination folder before generating the device client files. |
Replication-based | Select to use replication-based synchronization. |
Message-based | Select to use message-based synchronization. |
Backward compatible | Select so the generated code is compatible with the SUP 1.2 release. |
By default, the MBO source code is generated in the project's Generated Code folder. The generated .cs files are located in the <MBO_project_name> folder under the src folder. In this example, code was generated for the Customer MBO:
.cs File | Description |
---|---|
MBO class (for example, Customer. cs) | Includes all the attributes, operations, object queries, and so on, defined in the MBO. |
Metadata class (for example, CustomerMetaData.cs) | Includes attribute and operation metadata. |
Synchronization parameter class (for example, CustomerSynchronizationParameters.cs) | Includes any synchronization parameters defined in this MBO. |
Key generator classes (for example, KeyGenerator.cs) | Includes surrogate key generator used to identify and track MBO instances and data. |
Personalization parameter classes (for example, PersonalizationParameters.cs) | Includes any defined personalization keys. |
Connection and synchronization classes (for example, SUP_101DB.cs) | Includes the Unwired Server connection information and synchronization methods |