Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: MatthiasVDE on July 06, 2022, 04:30:43 pm
-
I'm extending the Repository class with some extra functions to make my development easier.
public class Repository : EA.RepositoryClass
{
}
When I add some new functions it works perfect. But now I want to add a new 'Collection' type to create and add new objects to the repository.
// Existing function
Repository.Stereotypes.AddNew
// New function
Repository.CustomObjects.AddNew
It's a long time ago that I worked with C#, so I hope that someone can give me a hint into the right direction.
-
Matthias,
Maybe you should what the goal is you are trying to achieve.
I've done a lot of add-in development, but I really can't follow what you are trying to do. Not even why you are creating a subclass of EA's repository class.
How does that work? EA surely only creates and passes it's own repository class, and not your subclass doesn't it?
My approach was to use composition rather then inheritance in this case (as you might remember) I think that is more suited in this case.
Geert
-
Hi Geert,
My 'Repository' class inherits from the EA.Repository class in the Interop DLL.
And I want to extend my class with some extra functions to add for example easily new Tagged Value Types.
EDIT: Indeed, I forgot... If I remember your concept of wrappers was based on a new class that contains the class from the EA.dll?