diff --git a/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers/BannedAssembliesAnalyzer.cs b/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers/BannedAssembliesAnalyzer.cs index c724195350c..72be67864ca 100644 --- a/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers/BannedAssembliesAnalyzer.cs +++ b/src/dotnet/Azure.ClientSdk.Analyzers/Azure.ClientSdk.Analyzers/BannedAssembliesAnalyzer.cs @@ -95,9 +95,9 @@ private static bool IsUtf8JsonReaderWriter(ITypeSymbol type) return (type.Name == "Utf8JsonReader" || type.Name == "Utf8JsonWriter") && GetFullNamespace(type.ContainingNamespace) == "System.Text.Json"; } - private static string GetFullNamespace(INamespaceSymbol type) + private static string GetFullNamespace(INamespaceSymbol namespaceSymbol) { - return type.ContainingNamespace.Name == "" ? type.Name : $"{GetFullNamespace(type.ContainingNamespace)}.{type.Name}"; + return namespaceSymbol.ContainingNamespace.Name == "" ? namespaceSymbol.Name : $"{GetFullNamespace(namespaceSymbol.ContainingNamespace)}.{namespaceSymbol.Name}"; } } } \ No newline at end of file