The InsertRegion merge strategy is useful when you need to generate a single region of code within a file that is otherwise not authored by CodeSmith Generator. The file must already exist with the appropriate region marked. CodeSmith Generator preserves the rest of the file untouched. When using the InsertRegion merge strategy, you specify an initialization string in this format:
Code Block | ||
---|---|---|
| ||
RegionName=<RegionName>;Language=<Language> |
For example,
Code Block | ||
---|---|---|
| ||
/merge:InsertRegion="RegionName=Sample Generated Region;Language=C#;" |
...