Skip to content

Commit 5d6041f

Browse files
committed
! Detected IDisposable interface more strictly in C# Quick Info
1 parent 7f3b66a commit 5d6041f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Codist/QuickInfo/CSharpQuickInfo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,6 @@ static void ShowEnumInfo(QiContainer qiContent, INamedTypeSymbol type, bool from
10751075
}
10761076

10771077
static void ShowInterfaces(QiContainer qiContent, ITypeSymbol type) {
1078-
const string Disposable = "IDisposable";
10791078
var showAll = Config.Instance.QuickInfoOptions.MatchFlags(QuickInfoOptions.InterfacesInheritence);
10801079
var interfaces = type.Interfaces;
10811080
if (interfaces.Length == 0 && showAll == false) {
@@ -1085,7 +1084,7 @@ static void ShowInterfaces(QiContainer qiContent, ITypeSymbol type) {
10851084
var inheritedInterfaces = ImmutableArray.CreateBuilder<INamedTypeSymbol>(5);
10861085
INamedTypeSymbol disposable = null;
10871086
foreach (var item in interfaces) {
1088-
if (item.Name == Disposable) {
1087+
if (item.IsDisposable()) {
10891088
disposable = item;
10901089
continue;
10911090
}
@@ -1097,7 +1096,7 @@ static void ShowInterfaces(QiContainer qiContent, ITypeSymbol type) {
10971096
if (interfaces.Contains(item)) {
10981097
continue;
10991098
}
1100-
if (item.Name == Disposable) {
1099+
if (item.IsDisposable()) {
11011100
disposable = item;
11021101
continue;
11031102
}

0 commit comments

Comments
 (0)