Book a Demo

Author Topic: How to generate partial classes to separate files  (Read 2277 times)

Andris

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
How to generate partial classes to separate files
« on: June 29, 2008, 03:38:49 am »
Hi,

I have an imported class diagram that contains partial classes. As I read it, EA supports partial classes since version 5 so I tried to figure out how to generate separate files from the two partial classes. EA uses the class name as the file name so I have two classes with the same name when generating. EA appends the second class to the first one so I get one file with two partial classes in it. As partial property is used for dividing the same class into two pieces I dare to think that EA has the ability to place them into separate files. How can I set it? Adding file name in the class properties Files section doesn't change the output file name. Both class has the tag 'partial', output language is C#, EA is version 7.0.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to generate partial classes to separate fi
« Reply #1 on: June 30, 2008, 08:35:19 am »
For the second class, just choose a different filename.  You won't be able to do this from the package generation dialog, but if you generate the single class it will give you the opportunity to set the filename.