Book a Demo

Author Topic: Allow Association Role generation as a Property.  (Read 4059 times)

dirc

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Allow Association Role generation as a Property.
« on: January 19, 2006, 04:33:33 am »
Currently, I can get associations in my class model to generate the code for the roles. I can set the scope of the generated field.

However, what I really want to do is to generated the field as a private field and then create a Property and then have the option to have make it read only... This would be an extension of the Property dialog used for explicitly created attributes.

I currently have to do this manually, and make sure to change the property if I change any associations, which kind of defeats the point of dynamic code generation.

My scenario: (C#)

I have a series of associated classes with multiplicity greater than one. So I have set it to use a collection class to generate the field. Best design says that I should make the collection a read only property so that users cannot just swap the collection.
« Last Edit: January 19, 2006, 04:38:23 am by dirc »
dirc