Custom Code is a code that is applied to generated code right after Export process. It is stored in separate folder on user computer (similar project file).
There is a special mode in CC Designer to extract Custom Code.
Custom Code structure
Each Custom Code peace consists of two files
*.cc-base.cs - original generated file on a moment of Custom Code extraction.
*.cs - modified file
Each time you export source code *.cc-base.cs file is compared with generated one.
If files are equal then generated one is replaced by *.cs (from Custom Code) otherwise conflict warning is raised.
Custom Code export conflicts
There could be export conflicts caused by project changes or Code Cruiser system updates.
Check export log for conflicts information.
Here is an example of how these errors look like:
These conflicts should be solved manually. To solve these conflicts look at Sources folder and navigate to conflict place. There would be 3 files:
*.cc-base.cs - old base file form Custom Code
*.cc-origin.cs - new generated base file
*.cs - current file with your code
Reason of the most conflicts is a difference between *.cc-base.cs and *.cc-origin.cs files.
To solve the conflict make modifications to *.cs based on the difference between *.cc-base.cs and *.cc-origin.cs files (in some cases no modifications needed).
Then run Extract Custom Code from CC Designer. This would update you Custom Code files.
Before writing custom code check Business Logic Placement chapter to select best option for where to place that code.
Created with the Personal Edition of HelpNDoc: News and information about help authoring tools and software