enterprise architect - How to get types of an attribute in an interface c# -
Working with an Add-in for Enterprise Architect (EA) I need to get all the different types of methods of a test in E. I <<
By this, I mean that the EA namespace receives the test class from an IDualTest interface, in which there is a set / set method for the string attribute named "type". There are 3 different types in the form of a standard EA (standard, regression, load), but it is possible to add all my own types I need all these types of.
I believe that this is possible with reflection, but this is not my strongest site, so I can actually use some help here. If more information is required, please comment.
Edit:
I got the following code:
list & lt; String & gt; TypeList = new list & lt; String & gt; (); Foreign language (type the tape in the test type) {typeList.Add (type); } The code above is not compiled but I hope it shows my needs. foreach (test t in elm test) {string type = t. Type; // This is a type that can be standard to EA and your own added type)
// - Output
// standard
// Revision
// Load
// Custom Type 1
// Custom Type 2
< Div class = "post-text" itemprop = "text">
There is no use for reflection here. These values are stored in the EA database, the "proper" way of querying the API is to use the repository. GetReferencType () like this:
EA Reference Exam Type = Repository GetReferenceList ("Test"); For (abbreviate i = 0; i
If you need more then only you can query directly from the database by name: repository SQLQuery ("select * from t_testtypes")
Comments
Post a Comment