Book a Demo

Author Topic: Modifying Enum and Property in C# Code Templates  (Read 2588 times)

tomp

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Modifying Enum and Property in C# Code Templates
« on: August 27, 2009, 12:31:33 am »
I can't seem to work out where the enum declaration is covered in the C# code templates.

Also what looks like it should be writing the Property gets and sets in the template Attribute Declaration has no effect when changed. For example I can edit or even remove this entire section (below) and I still see the properties as they are by default - which would not appear to be quite like this template section anyway.

Code: [Select]
%if attStereotype == "property"%
{\n\t//read property\n\tget{;}\n\t//write property\n\tset{;}\n}
%endTemplate%

David Peters

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Modifying Enum and Property in C# Code Templat
« Reply #1 on: August 29, 2009, 01:20:21 am »
Get/set properties are implemented with "dummy" operators.  View the Operator Body template, and then in Stereotype Overrides hit "property".  
« Last Edit: August 29, 2009, 01:31:07 am by DavidPeters »