Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: frik_stuart on February 09, 2009, 07:25:09 pm

Title: .Net Generic method parameters?
Post by: frik_stuart on February 09, 2009, 07:25:09 pm
I have a generic class that is defined in C# as follows:
public class Repository<T> : IRepository<T>

It has a method that takes an instance of type T as a parameter:
public virtual void Add(T entity);

I am trying to work out how to define this Parameterised parameter in the EA Parameters dialog for my operation? Would I enter <T> in the "Type:" droplist?

Reverse engineering the UML from the class definition also didn't work since the above "Add" method came back with no parameters defined. I was also unable to define the Parameterised Type for the Interface since the "Details" tab is not available. I presume these are bugs?

Any ideas from anyone how to solve this problem? It would make my round-trip engineering pretty much useless of this standard .Net2.0 functionality is not supported.
Title: Re: .Net Generic method parameters?
Post by: «Midnight» on February 09, 2009, 11:52:00 pm
I think you have to look up the parameter list (of the parameterized class) and define the type(s) for the parameter(s) there.