Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: kwazimoto on March 02, 2005, 04:48:22 pm

Title: C# Attribute Specification
Post by: kwazimoto 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() {}
   }
Title: Re: C# Attribute Specification
Post by: Eve 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