Open sant123 opened 12 months ago
When getting intellisense for reader, the list is not complete. In this case is missing the Dispose() method.
The method linked is protected so it doesn't show up in intellisense. The actual Dispose
method it would bind to is inSystem.Data.Common.DbDataReader
which does have the attribute.
So this is by design.
Decompiled library successfully with intellisense working
Not sure exactly what is happening here, but its likely an issue in ICSharpCode.Decompiler which we use to decompile. I've noticed the same issue reproduces in VS as well. There's probably not much we can do on the extension side.
I see ILSpy is also unable to decompile this, so almost certainly a bug or limitation on their end.
The method linked is protected so it doesn't show up in intellisense. The actual Dispose method it would bind to is inSystem.Data.Common.DbDataReader which does have the attribute.
@dibarbet thanks for pointing me out. Now I see the attribute but I'm curious why should not be shown in intellisense?
I think we may remove the [EditorBrowsable(EditorBrowsableState.Never)]
data annotation.
I see ILSpy is also unable to decompile this, so almost certainly a bug or limitation on their end.
So perhaps we may create an issue in order to them can look into?
Environment data
dotnet --info
output:VS Code version: 1.82.2 C# Extension version: v2.1.2
Steps to reproduce
Expected behavior
Decompiled library successfully with intellisense working
Actual behavior
Notice there is no type inference for SqlDataReader and its return type is null
Additional context
When getting intellisense for reader, the list is not complete. In this case is missing the
Dispose()
method.Looking at SqlClient source code for v5.1.1 the method is defined without a [EditorBrowsable(EditorBrowsableState.Never)] data annotation so it should be showed.
Also tested with VS Code C# Extension v1.26.0, it works but the decompiling is different compared to the source.