1- using System ;
1+ // -----------------------------------------------------------------------
2+ // <copyright file="ReferenceEqualityAnalyzer.cs" company="Ubiquity.NET Contributors">
3+ // Copyright (c) Ubiquity.NET Contributors. All rights reserved.
4+ // </copyright>
5+ // -----------------------------------------------------------------------
6+
7+ using System ;
28using System . Collections . Generic ;
39using System . Collections . Immutable ;
410using System . Diagnostics . CodeAnalysis ;
@@ -24,7 +30,7 @@ public class ReferenceEqualityAnalyzer
2430 {
2531 private const string RelevantNamespaceName = "Ubiquity.NET.Llvm" ;
2632
27- /// <summary>Diagnostics supported by this analyzer</summary>
33+ /// <summary>Gets the diagnostics supported by this analyzer</summary>
2834 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => Diagnostics . AllDiagnostics ;
2935
3036 /// <summary>Initializes the analyzer to detect potentially incorrect use</summary>
@@ -109,7 +115,7 @@ private static bool IsDeclaredInNamespace( ITypeSymbol typeSym, string namespace
109115 // EX: `a.b.c` becomes the sequence:
110116 // 'a', 'a.b`, 'a.b.c'
111117 // This allows for easy namespace Hierarchy checks.
112- static IEnumerable < string > GetNamespaceNames ( ITypeSymbol sym )
118+ private static IEnumerable < string > GetNamespaceNames ( ITypeSymbol sym )
113119 {
114120 return from part in sym . ContainingNamespace . ToDisplayParts ( )
115121 where part . Kind != SymbolDisplayPartKind . Punctuation
@@ -141,7 +147,6 @@ private static bool AreEquivalent( ITypeSymbol typeSymbol, ITypeSymbol lht, ITyp
141147 || IsDerivedFrom ( rht , typeSymbol ) ;
142148 }
143149
144-
145150 private static bool IsDerivedFrom ( ITypeSymbol derivedType , ITypeSymbol testBaseType )
146151 {
147152 if ( testBaseType . TypeKind == TypeKind . Interface )
@@ -158,6 +163,7 @@ private static bool IsDerivedFrom( ITypeSymbol derivedType, ITypeSymbol testBase
158163 }
159164 }
160165 }
166+
161167 return false ;
162168 }
163169
0 commit comments