Permalink
Browse files

Fix suppression for CA3053 to reference proper category and checkid.

  • Loading branch information...
robward-ms authored and AlanWong-MS committed Apr 7, 2017
1 parent 072f6f7 commit 272c74afd1dda7a4a8e562c45dd9da9a9d74dd8b
@@ -4,6 +4,8 @@
// </copyright>
//---------------------------------------------------------------------
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.OData.Metadata
{
#region Namespaces
@@ -25,6 +27,7 @@ internal static class ODataMetadataReaderUtils
/// <param name="encoding">The encoding to use to read the input.</param>
/// <param name="messageReaderSettings">The OData message reader settings used to control the settings of the Xml reader.</param>
/// <returns>An <see cref="XmlReader"/> instance configured with the provided settings.</returns>
[SuppressMessage("Microsoft.Security.Xml", "CA3053", Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
internal static XmlReader CreateXmlReader(Stream stream, Encoding encoding, ODataMessageReaderSettings messageReaderSettings)
{
Debug.Assert(stream != null, "stream != null");
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Xml;
@@ -651,9 +652,7 @@ private void ParseReferenceElement()
this.edmReferences.Add(result);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.FxCop.Rules.Security.Xml.SecurityXmlRules", "CA3053:UseXmlSecureResolver",
MessageId = "System.Xml.XmlReader.Create",
Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
[SuppressMessage("Microsoft.Security.Xml", "CA3053", Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
private void ParseSchemaElement()
{
Debug.Assert(this.reader.LocalName == CsdlConstants.Element_Schema, "Must call ParseCsdlSchemaElement on Schema Element");
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Xml;
using Microsoft.OData.Edm.Validation;
@@ -43,9 +44,7 @@ internal XmlAttributeInfo GetRequiredAttribute(XmlElementInfo element, string at
return attr;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.FxCop.Rules.Security.Xml.SecurityXmlRules", "CA3053:UseXmlSecureResolver",
MessageId = "System.Xml.XmlReader.Create",
Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
[SuppressMessage("Microsoft.Security.Xml", "CA3053", Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
protected override XmlReader InitializeReader(XmlReader reader)
{
XmlReaderSettings readerSettings = new XmlReaderSettings
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Xml;
@@ -73,9 +74,7 @@ internal static bool PropertySetsAreEquivalent(IEnumerable<IEdmStructuralPropert
return true;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.FxCop.Rules.Security.Xml.SecurityXmlRules", "CA3053:UseXmlSecureResolver",
MessageId = "System.Xml.XmlReader.Create",
Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
[SuppressMessage("Microsoft.Security.Xml", "CA3053", Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
internal static bool ValidateValueCanBeWrittenAsXmlElementAnnotation(IEdmValue value, string annotationNamespace, string annotationName, out EdmError error)
{
IEdmStringValue edmStringValue = value as IEdmStringValue;
@@ -47,9 +47,7 @@ public static class AlternateKeysVocabularyModel
/// <summary>
/// Parse Alternate Keys Vocabulary Model from AlternateKeysVocabularies.xml
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.FxCop.Rules.Security.Xml.SecurityXmlRules", "CA3053:UseXmlSecureResolver",
MessageId = "System.Xml.XmlReader.Create",
Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
[SuppressMessage("Microsoft.Security.Xml", "CA3053", Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
static AlternateKeysVocabularyModel()
{
Assembly assembly = typeof(AlternateKeysVocabularyModel).GetAssembly();
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
using System.Xml;
@@ -32,9 +33,7 @@ internal class CapabilitiesVocabularyModel
/// <summary>
/// Parse Capabilities Vocabulary Model from CapabilitiesVocabularies.xml
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.FxCop.Rules.Security.Xml.SecurityXmlRules", "CA3053:UseXmlSecureResolver",
MessageId = "System.Xml.XmlReader.Create",
Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
[SuppressMessage("Microsoft.Security.Xml", "CA3053", Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
static CapabilitiesVocabularyModel()
{
Assembly assembly = typeof(CapabilitiesVocabularyModel).GetAssembly();
@@ -122,9 +122,7 @@ public static class CoreVocabularyModel
/// <summary>
/// Parse Core Vocabulary Model from CoreVocabularies.xml
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.FxCop.Rules.Security.Xml.SecurityXmlRules", "CA3053:UseXmlSecureResolver",
MessageId = "System.Xml.XmlReader.Create",
Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
[SuppressMessage("Microsoft.Security.Xml", "CA3053", Justification = "The XmlResolver property no longer exists in .NET portable framework.")]
static CoreVocabularyModel()
{
IsInitializing = true;

0 comments on commit 272c74a

Please sign in to comment.