C# Interface Source Code Generation (#1609)

When adding attributes to an interface, I would like to set the accessibility of the attributes

interface IEmployee

{

string Name

{

get;

set;

}

}

But when I generate source code for the interface, the attributes are missing

Thank you

Created
12 July 2019 8:10:18
Closed
20 August 2019 22:30:13
Requested by
Sim18
State
Solved
Version
11.98.7088.15063
OperatingSystem
Windows
Solved in
11.99

Sim18 12 July 2019 8:32:46

Also for C# when creating a class, how can I inherit from multiple other classes, for example to create this code

public class Square : Shape, Object

{

}

I also found if I associate an owner (Element Properties > Owner) I cannot delete the owner

Dusan Rodina - softwareideas.net 12 July 2019 10:26:02

Hello,

The attributes are ignored in generated code for interfaces. It will be added in the next release as well as the problem with owner deleting.

You can inherit from multiple interfaces via Realization relationship (instead of Generalization).

Sim18 12 July 2019 12:05:53

Thank you Dusan

Sim18 13 July 2019 9:14:20

When I use Realization relationship, one of the classes gets added twice

public class Square : Shape, Shape, Object

{

}

Dusan Rodina - softwareideas.net 15 July 2019 10:54:09

It seems that there is a Generalization and also a Realization between Square and Shape. One of them may be present only in the model and not in the diagram. You can check it when you switch the project tree view from Hierarchical View to Hierarchical Model View.

TrackedRequestComment
Your Name:
You can use these formatting tags: [b]bold[/b] [i]italic[/i] [u]underline[/u] [url]www.example.com[/url] [code]some code[/code] [quote]quoted text[/quote] [list]one list item per line[/list]