| File: Microsoft.NetCore.Analyzers\Security\UseXmlReaderForSchemaRead.cs | Web Access |
| Project: src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Microsoft.CodeAnalysis.NetAnalyzers\Microsoft.CodeAnalysis.NetAnalyzers.csproj (Microsoft.CodeAnalysis.NetAnalyzers) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Analyzer.Utilities; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; namespace Microsoft.NetCore.Analyzers.Security { using static MicrosoftNetCoreAnalyzersResources; [DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)] public sealed class UseXmlReaderForSchemaRead : UseXmlReaderBase { internal const string DiagnosticId = "CA5371"; internal static readonly DiagnosticDescriptor RealRule = DiagnosticDescriptorHelper.Create( DiagnosticId, CreateLocalizableResourceString(nameof(UseXmlReaderForSchemaRead)), Message, DiagnosticCategory.Security, RuleLevel.IdeHidden_BulkConfigurable, description: Description, isPortedFxCopRule: false, isDataflowRule: false); protected override string TypeMetadataName => WellKnownTypeNames.SystemXmlSchemaXmlSchema; protected override string MethodMetadataName => "Read"; protected override DiagnosticDescriptor Rule => RealRule; } }