Book a Demo

Author Topic: C# Properties are not generated for linked attribu  (Read 2561 times)

mor

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
C# Properties are not generated for linked attribu
« on: January 09, 2004, 07:46:45 am »
Assume you have a class "Class1" and a private aggregation to class "Class2" with role name "class2".
Now you generate C# code for "Class1". The private member "class2" is generated correctly, but the Property "Class2" with get/set is missing.
I couldn't find any Property checkbox for aggregations like there is for attributes.
As a temporary workaround I then tried to add the property manually in the code and then resynchronize it. In the class diagram now the property appeared, but when regenerating now again the code, the assignments in the get/set routines looked like this :
Class2{
   get{
       return <unknown>;
   {
   set{
       <unknown> = value;
    }
}

This seems a trivial problem to me. I can't imagine there isn't a proper way to get properties generated automaticall for linked(aggregated) attributes. Any good solutions ?