Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Austinn on July 20, 2011, 12:56:08 am

Title: Generating C# code
Post by: Austinn on July 20, 2011, 12:56:08 am
Hello, I am evaluating EA. Just for the sake of example. I created a class diagram and added one interface IPerson  with 2 properties FirstName of String and LastName of String.

Now I added a class Employee in the class diagram and inherited that class from the interface.  Now when I try to generate the code using EA. It generated the c# code but it did't implemented those properties inside the class Employee.

I am expecting that it should create a proper skeleton of the class and  implement all the properties and methods definations from the inherited interface.

It did mentioned in the class defination that the Employee class is inherited form the IPerson interface, but did't implemented the properties.

Please help me if I am doning wrong or EA will is not suppose to generate the code what I am expecting.

Thanks
Title: Re: Generating C# code
Post by: Geert Bellekens on July 20, 2011, 05:06:28 pm
Austinn,

You'll have to implement the interfaces features in EA first before you they will show up in the generated code.
Select Employee and press Ctrl-Shift-O to implement the interface features.

Geert