Author Topic: C# Attribute Specification  (Read 3751 times)

kwazimoto

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • <sigh!>
    • View Profile
C# Attribute Specification
« on: March 02, 2005, 04:48:22 pm »
Does anybody know how to describe 'Attribute Specifications' in EA and have it generate properly?  

Also, how does an import of a class that uses Attributes work as well?

For example:

   // A test class where each method has its own pet.
   class AnimalTypeTestClass {
       [AnimalType(Animal.Dog)]
       public void DogMethod() {}

       [AnimalType(Animal.Cat)]
       public void CatMethod() {}

       [AnimalType(Animal.Bird)]
       public void BirdMethod() {}
   }

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8078
  • Karma: +118/-20
    • View Profile
Re: C# Attribute Specification
« Reply #1 on: March 02, 2005, 06:13:35 pm »
To generate this you will need to add a tagged value "Attribute" to your operations with the values "[AnimalType(Animal.Dog)]" etc.

This is what the reverse engineering will bring it in as.

Simon