LINQPad Intellisense and the EditorBrowsibleAttribute
Greetings.
Should LINQPad's Intellisense be respecting the [EditorBrowsable(EditorBrowsableState.Never)] attribute? It currently doesn't seem to, though I'm still researching.
I'm building a prototype to suggest my office use LINQPad as a scripting environment for non-techies. I'm writing an API which is a fluent interface, and I don't want my non-techie users to see System.Object methods in the Intellisense pop-up. So I'm taking an approach similar to KZu's IFluentInterface (https://github.com/kzu/IFluentInterface), which decorates the 4 System.Object methods with the EditorBrowsibleAttribute(Never) so that my users will only see the fluent methods I'm providing.
Unfortunately, this is not yet working in LINQPad - when I add references to my assemblies, and begin coding against my "fluent" types, the 4 Object methods are still showing up in Intellisense.
Before I dig too much farther into my own implementation, I wanted to ask whether this *should* be working in LINQPad.
Thanks.
Should LINQPad's Intellisense be respecting the [EditorBrowsable(EditorBrowsableState.Never)] attribute? It currently doesn't seem to, though I'm still researching.
I'm building a prototype to suggest my office use LINQPad as a scripting environment for non-techies. I'm writing an API which is a fluent interface, and I don't want my non-techie users to see System.Object methods in the Intellisense pop-up. So I'm taking an approach similar to KZu's IFluentInterface (https://github.com/kzu/IFluentInterface), which decorates the 4 System.Object methods with the EditorBrowsibleAttribute(Never) so that my users will only see the fluent methods I'm providing.
Unfortunately, this is not yet working in LINQPad - when I add references to my assemblies, and begin coding against my "fluent" types, the 4 Object methods are still showing up in Intellisense.
Before I dig too much farther into my own implementation, I wanted to ask whether this *should* be working in LINQPad.
Thanks.
Comments
Anything?
Thanks for the reply.
IFluentInterface (https://github.com/kzu/IFluentInterface).
LINQPad will also respect the attribute if it is applied to overridden methods in a base class, but given the size and complexity of my API, that's not really an option.
It would be confusing if after implicitly implementing members of an interface, you couldn't see those members in Intellisense. Especially if one or more of those members was already defined in your class prior to implementing the interface.
What do you think?
And have you considered explicitly implementing the members you wish to hide? They'll then be hidden from the type's public interface, as well as being hidden when cast to the interface.
Yes, I've looked at particularly overriding and decorating with [EditorBrowsable] the methods in all my API objects. Quite a pain, but obviously that's the route I'll have to take. Thanks for the attention; and for a great tool.