Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When you've finished setting properties for the template, you're ready to generate code. To do this, click the Generate button at the bottom of the template's property sheet. CodeSmith Generator will take the property values that you entered and combine them with the template to create the code, and display it in an expanded output window. The generated code will be selected so that can be edited by typing in the generated output window. Also you can copy it to the clipboard with a single click of Ctrl+Ceasily copy or save the generated text by clicking on the respected buttons at the top of the output window.

In this case, the code window contains around 320 lines of generated code for the hash table class, implementing the IDictionary, ICollection, IEnumerable, and ICloneable interfaces. There's nothing there that you couldn't write yourself if you're a reasonably experienced C# developer - but why bother? This is the sort of routine work that CodeSmith Generator is ideally suited for. With CodeSmith Generator CodeSmith Generator, you can devote your time and energy to identifying patterns in your code, turning them into templates, and then reuse them with maximum flexibility in the future.

Image RemovedImage Added

Next: Inspecting the Template

...