SharpDoc icon indicating copy to clipboard operation
SharpDoc copied to clipboard

Syntax Shows Internal Interfaces

Open tomspilman opened this issue 11 years ago • 4 comments

If you have some class defined like this in your code:

public partial class RenderTarget2D : Texture2D, IRenderTarget

... where IRenderTarget is an internal interface. The syntax box in the docs will show this...

public class RenderTarget2D : Texture2D, IRenderTarget

It should not display any non-public inheritance. It should have printed this:

public class RenderTarget2D : Texture2D

tomspilman avatar May 14 '14 06:05 tomspilman

Hm, internal you mean explicit interface implem? Still the IRenderTarget is public. Do you have an example where it is used in .NET and doesn't show up in their doc?

xoofx avatar May 14 '14 06:05 xoofx

Hm, internal you mean explicit interface implem? Still the IRenderTarget is public

I mean the interface itself is internal...

internal interface IRenderTarget
{

... in this case from outside the assembly no one can see the interface at all.

Do you have an example where it is used in .NET and doesn't show up in their doc?

I tried to find an example in http://referencesource.microsoft.com , but didn't come across one yet.

tomspilman avatar May 14 '14 06:05 tomspilman

Ohoh, discovering that internal interface are even possible! I was always thinking about public interface with explicit implementation, but never tried internal with inheritance on a public class, with public members of the interface still accessible, hm, interesting. So yep, it is not handled but should not be difficult to fix.

xoofx avatar May 14 '14 07:05 xoofx

Mono.Cecil makes everything possible. :)

No rush. I'll get to fixing this if you don't get a chance to.

tomspilman avatar May 14 '14 07:05 tomspilman