Products and Services
OxyGen Code Folders

Optimized for Visual Studio

The idea behind the folder structure changes is to separate the three types of code that can be found in a solution that uses OxyGen Code:

  • Generated code that has the potential to change from session to session
  • Generated code that does not change from session to session
  • Custom code written by the user
  • To help with the separation, four special folders are used

  • Custom
  • Generated
  • Intercepts
  • Durable
  • Custom
    When the code is first generated, an empty partial class for each entity is added to the 'Custom' folder. The code generator will not delete or replace any files in this folder. The generation of the empty partial class is optional and if this option is not selected, the custom folder will not be generated.

    Generated
    The Generated folder is the primary location for the generated files. Files stored directly by this folder may be replaced by the code generator on subsequent code generation sessions.

    Intercepts
    The Intercepts folder location contains partial classes with private methods that maybe used to modify the behavior of the generated methods. The generator will not delete or replace files in this folder. On subsequent generations, it may become necessary to modify some of these files to include additional methods. The generator will inject new methods into the matching files within this folder. The generator will not delete or replace methods in any file contained by this folder.

    You may modify the body of the methods contained by files in the Intercepts folder, but if you wish to write custom code unrelated to the Intercepts, the partial classes defined in the Custom folders are the right way to do it.

    Durable
    Files in the Durable folder will never be deleted or changed in any way by the code generator. This location was conceived as a container of files that don’t change across generation sessions. Typically, it contains base classes and utility/infrastructure classes. You may modify the classes in this location without fear that they may be overwritten.