Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

You may sometimes want to define a property with a default value that cannot be automatically converted from a string. In this case, you'll need to override the ParseDefaultValue method in your template to handle parsing the default value from the template and assigning it to the property. This method is called by CodeSmith for each property in the template, and gets passed the property and the default value string from the template. If you override the method, you can insert whatever custom logic you like to assign values to the property that you care about, while passing other properties to the base ParseDefaultValue method.

  • No labels