From 3bb5f14b31213c2d148505d7af1b4bc6b09a63e9 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Sun, 9 Feb 2020 10:15:07 -0500 Subject: [PATCH] Delete [SuppressMessage(...)] attributes for old/defunct/unused rules (#31966) --- .../Common/src/System/Drawing/KnownColor.cs | 1 - .../Common/tests/Resources/Strings.Designer.cs | 1 - .../src/Microsoft/Win32/RegistryKey.cs | 1 - .../src/Microsoft/Win32/SystemEvents.cs | 9 ------ .../src/GlobalSuppressions.cs | 6 ---- .../src/System.Collections.Immutable.csproj | 1 - .../Collections/Generic/IHashKeyCollection.cs | 1 - .../Collections/Generic/ISortKeyCollection.cs | 1 - .../Collections/Immutable/IImmutableDictionary.cs | 4 --- .../System/Collections/Immutable/IImmutableList.cs | 1 - .../Collections/Immutable/IImmutableQueue.cs | 2 -- .../System/Collections/Immutable/IImmutableSet.cs | 2 -- .../Collections/Immutable/IImmutableStack.cs | 2 -- .../Collections/Immutable/ImmutableDictionary.cs | 7 ----- .../Immutable/ImmutableDictionary_2.Builder.cs | 4 --- .../Collections/Immutable/ImmutableDictionary_2.cs | 3 -- .../Immutable/ImmutableHashSet_1.Builder.cs | 3 -- .../Collections/Immutable/ImmutableHashSet_1.cs | 1 - .../Immutable/ImmutableList_1.Builder.cs | 4 --- .../Collections/Immutable/ImmutableList_1.cs | 1 - .../System/Collections/Immutable/ImmutableQueue.cs | 2 -- .../Collections/Immutable/ImmutableQueue_1.cs | 3 -- .../Immutable/ImmutableSortedDictionary.cs | 7 ----- .../ImmutableSortedDictionary_2.Builder.cs | 4 --- .../Immutable/ImmutableSortedDictionary_2.cs | 3 -- .../Immutable/ImmutableSortedSet_1.Builder.cs | 3 -- .../Collections/Immutable/ImmutableSortedSet_1.cs | 1 - .../System/Collections/Immutable/ImmutableStack.cs | 2 -- .../Collections/Immutable/ImmutableStack_1.cs | 3 -- .../src/Validation/Requires.cs | 1 - .../src/System/Collections/Generic/HashSet.cs | 1 - .../src/System/Collections/Generic/LinkedList.cs | 1 - .../src/System/Collections/Generic/Queue.cs | 1 - .../System/Collections/Generic/SortedDictionary.cs | 3 -- .../src/System/Collections/Generic/SortedSet.cs | 2 -- .../src/System/Collections/Generic/Stack.cs | 1 - .../Composition/AttributedModelServices.cs | 1 - .../CatalogReflectionContextAttribute.cs | 1 - .../ComponentModel/Composition/ExportAttribute.cs | 1 - .../ComponentModel/Composition/ExportServices.cs | 3 -- .../Composition/Hosting/ApplicationCatalog.cs | 2 -- .../Composition/Hosting/AssemblyCatalog.cs | 2 -- .../Composition/Hosting/AtomicComposition.cs | 1 - .../Hosting/CatalogExportProvider.CatalogExport.cs | 1 - .../Composition/Hosting/CatalogExportProvider.cs | 2 -- .../Hosting/ComposablePartExportProvider.cs | 1 - .../Composition/Hosting/CompositionContainer.cs | 4 --- .../Composition/Hosting/DirectoryCatalog.cs | 2 -- .../Hosting/ExportProvider.GetExportOverrides.cs | 5 ---- .../Composition/Hosting/TypeCatalog.cs | 2 -- .../ComponentModel/Composition/ImportAttribute.cs | 1 - .../Composition/ImportManyAttribute.cs | 1 - .../Composition/ImportingConstructorAttribute.cs | 1 - .../Composition/InheritedExportAttribute.cs | 1 - .../Composition/MetadataViewProvider.cs | 1 - .../Primitives/ComposablePartCatalog.cs | 1 - .../Primitives/ContractBasedImportDefinition.cs | 3 -- .../Composition/Primitives/Export.cs | 1 - .../Composition/Primitives/ExportedDelegate.cs | 1 - .../Composition/Primitives/ImportDefinition.cs | 3 -- .../Composition/ReflectionModel/ImportingMember.cs | 2 -- .../ReflectionModel/ReflectionComposablePart.cs | 1 - .../ReflectionComposablePartDefinition.cs | 1 - .../ReflectionModel/ReflectionModelServices.cs | 7 ----- .../src/FxCopBaseline.cs | 7 ----- .../src/System.ComponentModel.Primitives.csproj | 3 -- .../System/ComponentModel/AmbientValueAttribute.cs | 1 - .../System/ComponentModel/AttributeCollection.cs | 3 -- .../ComponentModel/AttributeProviderAttribute.cs | 1 - .../src/System/ComponentModel/BindingList.cs | 3 -- .../ComponentModel/Design/DesignerOptionService.cs | 1 - .../System/ComponentModel/Design/DesignerVerb.cs | 2 -- .../Design/DesigntimeLicenseContextSerializer.cs | 1 - .../System/ComponentModel/Design/MenuCommand.cs | 1 - .../ComponentModel/Design/PropertyTabAttribute.cs | 2 -- .../Serialization/MemberRelationshipService.cs | 2 -- .../ComponentModel/EventDescriptorCollection.cs | 2 -- .../src/System/ComponentModel/IBindingList.cs | 2 -- .../src/System/ComponentModel/IBindingListView.cs | 1 - .../System/ComponentModel/IIntellisenseBuilder.cs | 1 - .../ComponentModel/InstallerTypeAttribute.cs | 2 -- .../src/System/ComponentModel/LicenseException.cs | 1 - .../ComponentModel/LicenseProviderAttribute.cs | 1 - .../System/ComponentModel/ListChangedEventArgs.cs | 3 -- .../ComponentModel/MarshalByValueComponent.cs | 1 - .../System/ComponentModel/MaskedTextProvider.cs | 2 -- .../ComponentModel/MultilineStringConverter.cs | 1 - .../System/ComponentModel/PropertyDescriptor.cs | 1 - .../ComponentModel/PropertyDescriptorCollection.cs | 6 ---- .../System/ComponentModel/ToolboxItemAttribute.cs | 2 -- .../src/System/ComponentModel/TypeConverter.cs | 1 - .../src/System/ComponentModel/TypeDescriptor.cs | 3 -- .../src/System/Drawing/ColorConverter.cs | 1 - .../src/System/Drawing/PointConverter.cs | 3 -- .../src/System/Drawing/RectangleConverter.cs | 3 -- .../src/System/Drawing/SizeConverter.cs | 3 -- .../src/System/Drawing/SizeFConverter.cs | 3 -- .../tests/Resources/TestResx.Designer.cs | 1 - .../src/System/Composition/ExportAttribute.cs | 1 - .../src/System/Composition/ImportAttribute.cs | 1 - .../src/System/Composition/ImportManyAttribute.cs | 1 - .../Hosting/Core/ExportDescriptorProvider.cs | 3 -- .../tests/Resources/Strings.Designer.cs | 1 - src/libraries/System.Console/src/FxCopBaseline.cs | 25 ----------------- .../System.Console/src/System.Console.csproj | 3 -- .../src/System/Data/Odbc/OdbcConnection.cs | 1 - .../System.Data.OleDb/src/OleDbConnection.cs | 1 - .../System/Data/ProviderBase/DbConnectionPool.cs | 1 - .../src/System/Diagnostics/Reader/EventMetadata.cs | 1 - .../src/System/Diagnostics/Reader/EventOpcode.cs | 1 - .../src/System/Diagnostics/Reader/EventRecord.cs | 2 -- .../System/Diagnostics/Reader/ProviderMetadata.cs | 1 - .../src/System/Diagnostics/Reader/Winmeta.cs | 1 - .../Diagnostics/PrivilegedConfigurationManager.cs | 1 - .../src/FxCopBaseline.cs | 11 -------- .../src/System.Diagnostics.Process.csproj | 3 -- .../src/FxCopBaseline.cs | 7 ----- ...stem.Diagnostics.TextWriterTraceListener.csproj | 3 -- .../src/FxCopBaseline.cs | 25 ----------------- .../src/System.Diagnostics.TraceSource.csproj | 3 -- .../src/System/Diagnostics/Switch.cs | 3 -- .../src/System/IO/Compression/ZipFile.Create.cs | 2 -- .../src/System/IO/Compression/ZipArchiveEntry.cs | 1 - .../src/System/IO/FileSystemWatcher.cs | 5 ---- .../System/IO/Pipes/AnonymousPipeClientStream.cs | 2 -- .../System/IO/Pipes/AnonymousPipeServerStream.cs | 1 - .../System/IO/Pipes/NamedPipeClientStream.Unix.cs | 1 - .../IO/Pipes/NamedPipeClientStream.Windows.cs | 1 - .../IO/Pipes/NamedPipeServerStream.Windows.cs | 1 - .../src/System/IO/Pipes/NamedPipeServerStream.cs | 1 - .../src/System/IO/Pipes/PipeStream.Unix.cs | 4 --- .../src/System/IO/Pipes/PipeStream.Windows.cs | 4 --- .../src/System/IO/Pipes/PipeStream.cs | 2 -- .../src/System/IO/Ports/SerialStream.Windows.cs | 1 - .../src/System/Dynamic/BinaryOperationBinder.cs | 1 - .../src/System/Dynamic/BindingRestrictions.cs | 1 - .../src/System/Dynamic/ConvertBinder.cs | 1 - .../src/System/Dynamic/DynamicMetaObject.cs | 2 -- .../src/System/Dynamic/DynamicMetaObjectBinder.cs | 1 - .../src/System/Dynamic/DynamicObject.cs | 10 ------- .../src/System/Dynamic/ExpandoObject.cs | 1 - .../System/Dynamic/UpdateDelegates.Generated.cs | 20 -------------- .../System/Dynamic/UpdateDelegates.Generated.tt | 2 -- .../src/System/Dynamic/Utils/TypeUtils.cs | 1 - .../System/Linq/Expressions/BinaryExpression.cs | 1 - .../Linq/Expressions/Compiler/BoundConstants.cs | 1 - .../Compiler/DelegateHelpers.Generated.cs | 1 - .../src/System/Linq/Expressions/Compiler/ILGen.cs | 2 -- .../Expressions/Compiler/LambdaCompiler.Binary.cs | 2 -- .../Compiler/LambdaCompiler.ControlFlow.cs | 1 - .../Compiler/LambdaCompiler.Expressions.cs | 1 - .../Compiler/LambdaCompiler.Generated.cs | 1 - .../Expressions/Compiler/LambdaCompiler.Logical.cs | 1 - .../Expressions/Compiler/LambdaCompiler.Unary.cs | 1 - .../Linq/Expressions/Compiler/LambdaCompiler.cs | 1 - .../Expressions/Compiler/StackSpiller.Generated.cs | 2 -- .../Expressions/Compiler/StackSpiller.Temps.cs | 2 -- .../src/System/Linq/Expressions/DebugViewWriter.cs | 5 ---- .../src/System/Linq/Expressions/Expression.cs | 2 -- .../Linq/Expressions/ExpressionStringBuilder.cs | 3 -- .../System/Linq/Expressions/ExpressionVisitor.cs | 1 - .../Linq/Expressions/Interpreter/AndInstruction.cs | 1 - .../Expressions/Interpreter/EqualInstruction.cs | 1 - .../Interpreter/ExclusiveOrInstruction.cs | 1 - .../Expressions/Interpreter/InstructionList.cs | 2 -- .../Expressions/Interpreter/InterpretedFrame.cs | 4 --- .../Interpreter/LeftShiftInstruction.cs | 1 - .../Linq/Expressions/Interpreter/LightCompiler.cs | 5 ---- .../Linq/Expressions/Interpreter/LocalAccess.cs | 1 - .../Expressions/Interpreter/NotEqualInstruction.cs | 1 - .../Interpreter/NumericConvertInstruction.cs | 2 -- .../Linq/Expressions/Interpreter/OrInstruction.cs | 1 - .../Interpreter/RightShiftInstruction.cs | 1 - .../Linq/Expressions/Interpreter/Utilities.cs | 2 -- .../src/System/Linq/Expressions/LabelTarget.cs | 1 - .../System/Linq/Expressions/MemberExpression.cs | 3 -- .../src/System/Linq/Expressions/NewExpression.cs | 1 - .../src/System/Linq/Expressions/UnaryExpression.cs | 1 - .../System/Runtime/CompilerServices/CallSite.cs | 5 ---- .../Runtime/CompilerServices/CallSiteHelpers.cs | 1 - .../src/System/Runtime/CompilerServices/Closure.cs | 4 --- .../CompilerServices/ReadOnlyCollectionBuilder.cs | 1 - .../System/Net/Http/Headers/HttpContentHeaders.cs | 4 --- .../src/System/Net/Http/Headers/HttpHeaders.cs | 2 -- .../System/Net/Http/Headers/HttpRequestHeaders.cs | 3 -- .../System/Net/Http/Headers/HttpResponseHeaders.cs | 2 -- .../src/System/Net/Http/HttpRequestException.cs | 1 - .../src/System/Net/Http/HttpRequestMessage.cs | 2 -- .../src/System/Net/Http/MultipartContent.cs | 3 -- .../System/Net/Http/MultipartFormDataContent.cs | 3 -- .../Net/Mail/SmtpFailedRecipientException.cs | 1 - .../Net/Mail/SmtpFailedRecipientsException.cs | 1 - .../System.Net.Requests/src/FxCopBaseline.cs | 16 ----------- .../src/System.Net.Requests.csproj | 3 -- .../src/System/Net/FtpDataStream.cs | 1 - .../Net/WebSockets/ClientWebSocketOptions.cs | 2 -- .../System/Net/WebSockets/WebSocketCloseStatus.cs | 4 --- .../System/Net/WebSockets/WebSocketException.cs | 28 ------------------- .../src/System/Threading/ThreadPool.cs | 1 - .../Runtime/Serialization/Json/XmlJsonWriter.cs | 5 ---- .../System.Private.Uri/src/FxCopBaseline.cs | 8 ------ .../src/System.Private.Uri.csproj | 3 -- src/libraries/System.Private.Uri/src/System/Uri.cs | 1 - .../src/System/Xml/Linq/XAttribute.cs | 1 - .../src/System/Xml/Linq/XDocument.cs | 2 -- .../src/System/Xml/Linq/XElement.cs | 27 ------------------ .../src/System/Xml/Linq/XLinq.cs | 1 - .../src/System/Xml/Linq/XName.cs | 1 - .../src/System/Xml/Linq/XNamespace.cs | 1 - .../src/System/Xml/Linq/XNode.cs | 2 -- .../src/System/Xml/Linq/XObject.cs | 1 - .../src/System/Xml/Linq/XObjectChangeEventArgs.cs | 4 --- .../src/System/Xml/Schema/XNodeValidator.cs | 5 ---- .../src/System/Xml/Serialization/Compilation.cs | 1 - .../System/Xml/Serialization/Xmlcustomformatter.cs | 1 - .../src/System/Xml/Xslt/XslCompiledTransform.cs | 5 ---- .../tests/Properties/Resources.Designer.cs | 1 - .../tests/Resources/TestResx.Designer.cs | 1 - .../Resources/TestResx.netstandard17.Designer.cs | 1 - .../src/System/Runtime/Caching/CacheExpires.cs | 3 -- .../src/System/Runtime/Caching/CacheUsage.cs | 2 -- .../src/System/Runtime/Caching/ChangeMonitor.cs | 2 -- .../src/System/Runtime/Caching/MemoryCache.cs | 2 -- .../src/System/Runtime/Caching/MemoryCacheEntry.cs | 1 - .../Runtime/Caching/MemoryCacheStatistics.cs | 1 - .../src/System/Runtime/Caching/ObjectCache.cs | 5 ---- .../src/System/Net/WebUtility.cs | 2 -- .../src/System/Numerics/Complex.cs | 4 --- src/libraries/System.Runtime/src/System/Action.cs | 8 ------ .../System.Runtime/src/System/Function.cs | 8 ------ .../Cryptography/Pal.OSX/AppleCertificatePal.cs | 3 +- .../X509Certificates/X509Certificate.cs | 1 - .../System/Security/Principal/WindowsIdentity.cs | 1 - .../Syndication/Atom10FeedFormatter.cs | 4 --- .../Syndication/Atom10ItemFormatter.cs | 3 -- .../AtomPub10CategoriesDocumentFormatter.cs | 3 -- .../AtomPub10ServiceDocumentFormatter.cs | 3 -- .../ServiceModel/Syndication/Rss20FeedFormatter.cs | 4 --- .../ServiceModel/Syndication/Rss20ItemFormatter.cs | 3 -- .../ServiceModel/Syndication/SyndicationItem.cs | 2 -- .../ServiceModel/Syndication/SyndicationPerson.cs | 2 -- .../src/Base/DataflowBlock.cs | 32 ---------------------- .../src/Base/ISourceBlock.cs | 1 - .../src/Blocks/ActionBlock.cs | 2 -- .../src/Blocks/BatchBlock.cs | 7 ----- .../src/Blocks/BatchedJoinBlock.cs | 9 ------ .../src/Blocks/BroadcastBlock.cs | 6 ---- .../src/Blocks/BufferBlock.cs | 2 -- .../src/Blocks/JoinBlock.cs | 11 -------- .../src/Blocks/TransformBlock.cs | 4 --- .../src/Blocks/TransformManyBlock.cs | 7 ----- .../src/Blocks/WriteOnceBlock.cs | 4 --- .../src/Internal/ActionOnDispose.cs | 2 -- .../src/Internal/Common.cs | 10 ------- .../src/Internal/DataflowEtwProvider.cs | 1 - .../src/Internal/SourceCore.cs | 4 --- .../src/Internal/SpscTargetCore.cs | 3 -- .../src/Internal/TargetCore.cs | 5 ---- .../src/Internal/TargetRegistry.cs | 1 - .../System/Transactions/CommittableTransaction.cs | 1 - .../System/Transactions/DependentTransaction.cs | 1 - .../System/Transactions/SubordinateTransaction.cs | 1 - .../src/System/Transactions/Transaction.cs | 1 - .../src/System/Web/Util/HttpEncoder.cs | 4 --- 264 files changed, 1 insertion(+), 785 deletions(-) delete mode 100644 src/libraries/System.Collections.Immutable/src/GlobalSuppressions.cs delete mode 100644 src/libraries/System.ComponentModel.Primitives/src/FxCopBaseline.cs delete mode 100644 src/libraries/System.Console/src/FxCopBaseline.cs delete mode 100644 src/libraries/System.Diagnostics.Process/src/FxCopBaseline.cs delete mode 100644 src/libraries/System.Diagnostics.TextWriterTraceListener/src/FxCopBaseline.cs delete mode 100644 src/libraries/System.Diagnostics.TraceSource/src/FxCopBaseline.cs delete mode 100644 src/libraries/System.Net.Requests/src/FxCopBaseline.cs delete mode 100644 src/libraries/System.Private.Uri/src/FxCopBaseline.cs diff --git a/src/libraries/Common/src/System/Drawing/KnownColor.cs b/src/libraries/Common/src/System/Drawing/KnownColor.cs index f429786..8f4694c 100644 --- a/src/libraries/Common/src/System/Drawing/KnownColor.cs +++ b/src/libraries/Common/src/System/Drawing/KnownColor.cs @@ -7,7 +7,6 @@ using System.Runtime.CompilerServices; namespace System.Drawing { - [SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")] [TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] #if NETCOREAPP2_0 internal diff --git a/src/libraries/Common/tests/Resources/Strings.Designer.cs b/src/libraries/Common/tests/Resources/Strings.Designer.cs index a4f700f..73c0f19 100644 --- a/src/libraries/Common/tests/Resources/Strings.Designer.cs +++ b/src/libraries/Common/tests/Resources/Strings.Designer.cs @@ -29,7 +29,6 @@ namespace Resources { private static global::System.Globalization.CultureInfo resourceCulture; - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Strings() { } diff --git a/src/libraries/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs b/src/libraries/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs index f3b1ef1..eaef000 100644 --- a/src/libraries/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs +++ b/src/libraries/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs @@ -126,7 +126,6 @@ namespace Microsoft.Win32 /// Creates a new subkey, or opens an existing one. /// Name or path to subkey to create or open. /// The subkey, or null if the operation failed. - [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "Reviewed for thread safety")] public RegistryKey CreateSubKey(string subkey) { return CreateSubKey(subkey, _checkMode); diff --git a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SystemEvents.cs b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SystemEvents.cs index 0fb8034..06e9bff 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SystemEvents.cs +++ b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SystemEvents.cs @@ -70,7 +70,6 @@ namespace Microsoft.Win32 // stole from SystemInformation... if we get SystemInformation moved // to somewhere that we can use it... rip this! - [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] private static volatile IntPtr s_processWinStation = IntPtr.Zero; private static volatile bool s_isUserInteractive = false; private static unsafe bool UserInteractive @@ -715,8 +714,6 @@ namespace Microsoft.Win32 /// This empties this control's callback queue, propagating any exceptions /// back as needed. /// - [SuppressMessage("Microsoft.Security", "CA2102:CatchNonClsCompliantExceptionsInGeneralHandlers")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void InvokeMarshaledCallbacks() { Debug.Assert(s_threadCallbackList != null, "Invoking marshaled callbacks before there are any"); @@ -998,8 +995,6 @@ namespace Microsoft.Win32 RaiseEvent(true, key, args); } - [SuppressMessage("Microsoft.Security", "CA2102:CatchNonClsCompliantExceptionsInGeneralHandlers")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private static void RaiseEvent(bool checkFinalization, object key, params object[] args) { Debug.Assert(args != null && args.Length == 2); @@ -1129,8 +1124,6 @@ namespace Microsoft.Win32 /// /// A standard Win32 window proc for our broadcast window. /// - [SuppressMessage("Microsoft.Security", "CA2102:CatchNonClsCompliantExceptionsInGeneralHandlers")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private IntPtr WindowProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam) { switch (msg) @@ -1255,8 +1248,6 @@ namespace Microsoft.Win32 /// is made visible with a size of 0, 0, so that it will trap /// global broadcast messages. /// - [SuppressMessage("Microsoft.Security", "CA2102:CatchNonClsCompliantExceptionsInGeneralHandlers")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void WindowThreadProc() { try diff --git a/src/libraries/System.Collections.Immutable/src/GlobalSuppressions.cs b/src/libraries/System.Collections.Immutable/src/GlobalSuppressions.cs deleted file mode 100644 index 7f4af83..0000000 --- a/src/libraries/System.Collections.Immutable/src/GlobalSuppressions.cs +++ /dev/null @@ -1,6 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Collections.Generic")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1016:MarkAssembliesWithAssemblyVersion", Justification = "The official build system adds this attribute.")] diff --git a/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj b/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj index c8521b0..52d3aaa 100644 --- a/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj +++ b/src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj @@ -10,7 +10,6 @@ - diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Generic/IHashKeyCollection.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Generic/IHashKeyCollection.cs index 452ac0e..9a2fcaf 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Generic/IHashKeyCollection.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Generic/IHashKeyCollection.cs @@ -8,7 +8,6 @@ namespace System.Collections.Generic /// Defined on a generic collection that hashes its contents using an . /// /// The type of element hashed in the collection. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] internal interface IHashKeyCollection { /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Generic/ISortKeyCollection.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Generic/ISortKeyCollection.cs index b789640..aff634c 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Generic/ISortKeyCollection.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Generic/ISortKeyCollection.cs @@ -10,7 +10,6 @@ namespace System.Collections.Generic /// Defined on a generic collection that sorts its contents using an . /// /// The type of element sorted in the collection. - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] internal interface ISortKeyCollection { /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableDictionary.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableDictionary.cs index 2db1359..ef33b1c 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableDictionary.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableDictionary.cs @@ -13,8 +13,6 @@ namespace System.Collections.Immutable /// /// The type of the key. /// The type of the value. - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] public interface IImmutableDictionary : IReadOnlyDictionary { /// @@ -42,7 +40,6 @@ namespace System.Collections.Immutable /// The pairs. /// The new dictionary containing the additional key-value pairs. /// Thrown when one of the given keys already exists in the dictionary but has a different value. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] IImmutableDictionary AddRange(IEnumerable> pairs); @@ -65,7 +62,6 @@ namespace System.Collections.Immutable /// The key=value pairs to set on the dictionary. Any keys that conflict with existing keys will overwrite the previous values. /// An immutable dictionary. [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] IImmutableDictionary SetItems(IEnumerable> items); /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableList.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableList.cs index b6e4297..0554506 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableList.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableList.cs @@ -16,7 +16,6 @@ namespace System.Collections.Immutable /// Mutations on this list generate new lists. Incremental changes to a list share as much memory as possible with the prior versions of a list, /// while allowing garbage collection to clean up any unique list data that is no longer being referenced. /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] public interface IImmutableList : IReadOnlyList { /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableQueue.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableQueue.cs index 588980f..9209b1a 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableQueue.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableQueue.cs @@ -12,8 +12,6 @@ namespace System.Collections.Immutable /// An immutable queue. /// /// The type of elements in the queue. - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "Ignored")] public interface IImmutableQueue : IEnumerable { /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableSet.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableSet.cs index 9dce4cd..45acf28 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableSet.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableSet.cs @@ -16,8 +16,6 @@ namespace System.Collections.Immutable /// Mutations on this set generate new sets. Incremental changes to a set share as much memory as possible with the prior versions of a set, /// while allowing garbage collection to clean up any unique set data that is no longer being referenced. /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "Ignored")] public interface IImmutableSet : IReadOnlyCollection { /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableStack.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableStack.cs index 0a52496..73a892c 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableStack.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/IImmutableStack.cs @@ -12,8 +12,6 @@ namespace System.Collections.Immutable /// An immutable stack. /// /// The type of elements stored in the stack. - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "Ignored")] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] public interface IImmutableStack : IEnumerable { /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary.cs index c6d8239..68b9bfc 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary.cs @@ -12,7 +12,6 @@ namespace System.Collections.Immutable /// /// A set of initialization methods for instances of . /// - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] public static class ImmutableDictionary { /// @@ -66,7 +65,6 @@ namespace System.Collections.Immutable /// The items to prepopulate. /// The new immutable collection. [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ImmutableDictionary CreateRange(IEnumerable> items) where TKey : notnull { return ImmutableDictionary.Empty.AddRange(items); @@ -81,7 +79,6 @@ namespace System.Collections.Immutable /// The items to prepopulate. /// The new immutable collection. [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ImmutableDictionary CreateRange(IEqualityComparer? keyComparer, IEnumerable> items) where TKey : notnull { return ImmutableDictionary.Empty.WithComparers(keyComparer).AddRange(items); @@ -97,7 +94,6 @@ namespace System.Collections.Immutable /// The items to prepopulate. /// The new immutable collection. [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ImmutableDictionary CreateRange(IEqualityComparer? keyComparer, IEqualityComparer? valueComparer, IEnumerable> items) where TKey : notnull { return ImmutableDictionary.Empty.WithComparers(keyComparer, valueComparer).AddRange(items); @@ -250,7 +246,6 @@ namespace System.Collections.Immutable /// The value comparer to use for the immutable map. /// An immutable map. [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ImmutableDictionary ToImmutableDictionary(this IEnumerable> source, IEqualityComparer? keyComparer, IEqualityComparer? valueComparer) where TKey : notnull { Requires.NotNull(source, nameof(source)); @@ -273,7 +268,6 @@ namespace System.Collections.Immutable /// The key comparer to use when building the immutable map. /// An immutable map. [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ImmutableDictionary ToImmutableDictionary(this IEnumerable> source, IEqualityComparer? keyComparer) where TKey : notnull { return ToImmutableDictionary(source, keyComparer, null); @@ -287,7 +281,6 @@ namespace System.Collections.Immutable /// The sequence of key=value pairs. /// An immutable map. [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ImmutableDictionary ToImmutableDictionary(this IEnumerable> source) where TKey : notnull { return ToImmutableDictionary(source, null, null); diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.Builder.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.Builder.cs index 11717ea..5b94faa 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.Builder.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.Builder.cs @@ -12,7 +12,6 @@ namespace System.Collections.Immutable /// /// Contains the inner class. /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] public sealed partial class ImmutableDictionary { /// @@ -29,8 +28,6 @@ namespace System.Collections.Immutable /// Instance members of this class are not thread-safe. /// /// - [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Ignored")] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] [DebuggerDisplay("Count = {Count}")] [DebuggerTypeProxy(typeof(ImmutableDictionaryBuilderDebuggerProxy<,>))] public sealed class Builder : IDictionary, IReadOnlyDictionary, IDictionary @@ -435,7 +432,6 @@ namespace System.Collections.Immutable /// Adds a sequence of values to this collection. /// /// The items. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public void AddRange(IEnumerable> items) { var result = ImmutableDictionary.AddRange(items, this.Origin); diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.cs index d921380..1d5241c 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.cs @@ -22,7 +22,6 @@ namespace System.Collections.Immutable /// /// An empty immutable dictionary with default equality comparers. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly ImmutableDictionary Empty = new ImmutableDictionary(); /// @@ -313,7 +312,6 @@ namespace System.Collections.Immutable /// See the interface. /// [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public ImmutableDictionary AddRange(IEnumerable> pairs) { Requires.NotNull(pairs, nameof(pairs)); @@ -339,7 +337,6 @@ namespace System.Collections.Immutable /// The key=value pairs to set on the map. Any keys that conflict with existing keys will overwrite the previous values. /// An immutable dictionary. [Pure] - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public ImmutableDictionary SetItems(IEnumerable> items) { Requires.NotNull(items, nameof(items)); diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.Builder.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.Builder.cs index 589a3e0..d212581 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.Builder.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.Builder.cs @@ -11,7 +11,6 @@ namespace System.Collections.Immutable /// /// Contains the inner class. /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] public sealed partial class ImmutableHashSet { /// @@ -28,8 +27,6 @@ namespace System.Collections.Immutable /// Instance members of this class are not thread-safe. /// /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] - [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Ignored")] [DebuggerDisplay("Count = {Count}")] public sealed class Builder : IReadOnlyCollection, ISet { diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs index 8fc536a..8482c10 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.cs @@ -21,7 +21,6 @@ namespace System.Collections.Immutable /// /// An empty immutable hash set with the default comparer for . /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly ImmutableHashSet Empty = new ImmutableHashSet(SortedInt32KeyNode.EmptyNode, EqualityComparer.Default, 0); /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs index bc64eb2..104ffe2 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs @@ -12,7 +12,6 @@ namespace System.Collections.Immutable /// /// Contains the inner Builder class. /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] public sealed partial class ImmutableList { /// @@ -29,8 +28,6 @@ namespace System.Collections.Immutable /// Instance members of this class are not thread-safe. /// /// - [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Ignored")] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] [DebuggerDisplay("Count = {Count}")] [DebuggerTypeProxy(typeof(ImmutableListBuilderDebuggerProxy<>))] public sealed class Builder : IList, IList, IOrderedCollection, IImmutableListQueries, IReadOnlyList @@ -130,7 +127,6 @@ namespace System.Collections.Immutable /// /// The index of the desired element. /// The value at the specified index. - [SuppressMessage("Microsoft.Usage", "CA2233:OperationsShouldNotOverflow", MessageId = "index+1", Justification = "There is no chance of this overflowing")] public T this[int index] { get diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs index aa90536..d7a0f7f 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs @@ -21,7 +21,6 @@ namespace System.Collections.Immutable /// /// An empty immutable list. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly ImmutableList Empty = new ImmutableList(); /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue.cs index 7fe64df..107fa53 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue.cs @@ -12,7 +12,6 @@ namespace System.Collections.Immutable /// /// A set of initialization methods for instances of . /// - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] public static class ImmutableQueue { /// @@ -105,7 +104,6 @@ namespace System.Collections.Immutable /// Receives the value from the head of the queue. /// The new queue with the head element removed. /// Thrown when the stack is empty. - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#")] [Pure] public static IImmutableQueue Dequeue(this IImmutableQueue queue, out T value) { diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs index 2a894af..c0263bc 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs @@ -16,8 +16,6 @@ namespace System.Collections.Immutable /// The type of elements stored in the queue. [DebuggerDisplay("IsEmpty = {IsEmpty}")] [DebuggerTypeProxy(typeof(ImmutableEnumerableDebuggerProxy<>))] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "Ignored")] public sealed partial class ImmutableQueue : IImmutableQueue { /// @@ -222,7 +220,6 @@ namespace System.Collections.Immutable /// Receives the value from the head of the queue. /// The new queue with the head element removed. /// Thrown when the queue is empty. - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")] [Pure] public ImmutableQueue Dequeue(out T value) { diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary.cs index e5881df..658c829 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary.cs @@ -12,7 +12,6 @@ namespace System.Collections.Immutable /// /// A set of initialization methods for instances of . /// - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] public static class ImmutableSortedDictionary { /// @@ -61,7 +60,6 @@ namespace System.Collections.Immutable /// The type of values stored by the dictionary. /// The items to prepopulate. /// The new immutable collection. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] public static ImmutableSortedDictionary CreateRange(IEnumerable> items) where TKey : notnull { @@ -76,7 +74,6 @@ namespace System.Collections.Immutable /// The key comparer. /// The items to prepopulate. /// The new immutable collection. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] public static ImmutableSortedDictionary CreateRange(IComparer? keyComparer, IEnumerable> items) where TKey : notnull { @@ -92,7 +89,6 @@ namespace System.Collections.Immutable /// The value comparer. /// The items to prepopulate. /// The new immutable collection. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] public static ImmutableSortedDictionary CreateRange(IComparer? keyComparer, IEqualityComparer? valueComparer, IEnumerable> items) where TKey : notnull { @@ -216,7 +212,6 @@ namespace System.Collections.Immutable /// The key comparer to use when building the immutable map. /// The value comparer to use for the immutable map. /// An immutable map. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] public static ImmutableSortedDictionary ToImmutableSortedDictionary(this IEnumerable> source, IComparer? keyComparer, IEqualityComparer? valueComparer) where TKey : notnull { @@ -239,7 +234,6 @@ namespace System.Collections.Immutable /// The sequence of key=value pairs. /// The key comparer to use when building the immutable map. /// An immutable map. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] public static ImmutableSortedDictionary ToImmutableSortedDictionary(this IEnumerable> source, IComparer? keyComparer) where TKey : notnull { @@ -253,7 +247,6 @@ namespace System.Collections.Immutable /// The type of value in the map. /// The sequence of key=value pairs. /// An immutable map. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] public static ImmutableSortedDictionary ToImmutableSortedDictionary(this IEnumerable> source) where TKey : notnull { diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs index eee40ac..03b403b 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs @@ -12,7 +12,6 @@ namespace System.Collections.Immutable /// /// Contains the inner class. /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] public sealed partial class ImmutableSortedDictionary where TKey : notnull { /// @@ -27,8 +26,6 @@ namespace System.Collections.Immutable /// Instance members of this class are not thread-safe. /// /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] - [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Ignored")] [DebuggerDisplay("Count = {Count}")] [DebuggerTypeProxy(typeof(ImmutableSortedDictionaryBuilderDebuggerProxy<,>))] public sealed class Builder : IDictionary, IReadOnlyDictionary, IDictionary @@ -580,7 +577,6 @@ namespace System.Collections.Immutable /// Removes any entries from the dictionaries with keys that match those found in the specified sequence. /// /// The keys for entries to remove from the dictionary. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public void AddRange(IEnumerable> items) { Requires.NotNull(items, nameof(items)); diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs index af7c482..50a582c 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs @@ -23,7 +23,6 @@ namespace System.Collections.Immutable /// /// An empty sorted dictionary with default sort and equality comparers. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly ImmutableSortedDictionary Empty = new ImmutableSortedDictionary(); /// @@ -282,7 +281,6 @@ namespace System.Collections.Immutable /// /// The key=value pairs to set on the map. Any keys that conflict with existing keys will overwrite the previous values. /// An immutable dictionary. - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] public ImmutableSortedDictionary SetItems(IEnumerable> items) { @@ -294,7 +292,6 @@ namespace System.Collections.Immutable /// /// See the interface. /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] [Pure] public ImmutableSortedDictionary AddRange(IEnumerable> items) { diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs index a31de70..4cb1476 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs @@ -12,7 +12,6 @@ namespace System.Collections.Immutable /// /// Contains the inner class. /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] public sealed partial class ImmutableSortedSet { /// @@ -29,8 +28,6 @@ namespace System.Collections.Immutable /// Instance members of this class are not thread-safe. /// /// - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] - [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Justification = "Ignored")] [DebuggerDisplay("Count = {Count}")] [DebuggerTypeProxy(typeof(ImmutableSortedSetBuilderDebuggerProxy<>))] public sealed class Builder : ISortKeyCollection, IReadOnlyCollection, ISet, ICollection diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs index bc1482b..94fca21 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs @@ -33,7 +33,6 @@ namespace System.Collections.Immutable /// /// An empty sorted set with the default sort comparer. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly ImmutableSortedSet Empty = new ImmutableSortedSet(); /// diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack.cs index 9361c69..91cc379 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack.cs @@ -11,7 +11,6 @@ namespace System.Collections.Immutable /// /// A set of initialization methods for instances of . /// - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] public static class ImmutableStack { /// @@ -87,7 +86,6 @@ namespace System.Collections.Immutable /// A stack; never null /// /// Thrown when the stack is empty. - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#")] [Pure] public static IImmutableStack Pop(this IImmutableStack stack, out T value) { diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs index 55decdb..a6d0c1d 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs @@ -16,8 +16,6 @@ namespace System.Collections.Immutable /// The type of element stored by the stack. [DebuggerDisplay("IsEmpty = {IsEmpty}; Top = {_head}")] [DebuggerTypeProxy(typeof(ImmutableEnumerableDebuggerProxy<>))] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")] - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "Ignored")] public sealed partial class ImmutableStack : IImmutableStack { /// @@ -184,7 +182,6 @@ namespace System.Collections.Immutable /// /// A stack; never null /// - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")] [Pure] public ImmutableStack Pop(out T value) { diff --git a/src/libraries/System.Collections.Immutable/src/Validation/Requires.cs b/src/libraries/System.Collections.Immutable/src/Validation/Requires.cs index 06e65df..7305c45 100644 --- a/src/libraries/System.Collections.Immutable/src/Validation/Requires.cs +++ b/src/libraries/System.Collections.Immutable/src/Validation/Requires.cs @@ -121,7 +121,6 @@ namespace System.Collections.Immutable /// /// Throws an if a condition does not evaluate to true. /// - [SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly")] [DebuggerStepThrough] public static void Argument(bool condition) { diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/HashSet.cs b/src/libraries/System.Collections/src/System/Collections/Generic/HashSet.cs index 6b38643..8b2486b 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/HashSet.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/HashSet.cs @@ -47,7 +47,6 @@ namespace System.Collections.Generic /// [DebuggerTypeProxy(typeof(ICollectionDebugView<>))] [DebuggerDisplay("Count = {Count}")] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "By design")] [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class HashSet : ICollection, ISet, IReadOnlyCollection, ISerializable, IDeserializationCallback diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/LinkedList.cs b/src/libraries/System.Collections/src/System/Collections/Generic/LinkedList.cs index d4c2901..1a3ea10 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/LinkedList.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/LinkedList.cs @@ -526,7 +526,6 @@ namespace System.Collections.Generic return GetEnumerator(); } - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "not an expected scenario")] public struct Enumerator : IEnumerator, IEnumerator, ISerializable, IDeserializationCallback { private readonly LinkedList _list; diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/Queue.cs b/src/libraries/System.Collections/src/System/Collections/Generic/Queue.cs index f8e8b26..410360a 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/Queue.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/Queue.cs @@ -390,7 +390,6 @@ namespace System.Collections.Generic // Implements an enumerator for a Queue. The enumerator uses the // internal version number of the list to ensure that no modifications are // made to the list while an enumeration is in progress. - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "not an expected scenario")] public struct Enumerator : IEnumerator, System.Collections.IEnumerator { diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs b/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs index 5f59ab4..a62acb5 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/SortedDictionary.cs @@ -441,7 +441,6 @@ namespace System.Collections.Generic return new Enumerator(this, Enumerator.KeyValuePair); } - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "not an expected scenario")] public struct Enumerator : IEnumerator>, IDictionaryEnumerator { private TreeSet>.Enumerator _treeEnum; @@ -689,7 +688,6 @@ namespace System.Collections.Generic get { return ((ICollection)_dictionary).SyncRoot; } } - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "not an expected scenario")] public struct Enumerator : IEnumerator, IEnumerator { private SortedDictionary.Enumerator _dictEnum; @@ -873,7 +871,6 @@ namespace System.Collections.Generic get { return ((ICollection)_dictionary).SyncRoot; } } - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "not an expected scenario")] public struct Enumerator : IEnumerator, IEnumerator { private SortedDictionary.Enumerator _dictEnum; diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/SortedSet.cs b/src/libraries/System.Collections/src/System/Collections/Generic/SortedSet.cs index d82c405..33ba6d3 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/SortedSet.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/SortedSet.cs @@ -41,7 +41,6 @@ namespace System.Collections.Generic RightLeft } - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "by design name choice")] [DebuggerTypeProxy(typeof(ICollectionDebugView<>))] [DebuggerDisplay("Count = {Count}")] [Serializable] @@ -1899,7 +1898,6 @@ namespace System.Collections.Generic #endif } - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "not an expected scenario")] public struct Enumerator : IEnumerator, IEnumerator, ISerializable, IDeserializationCallback { private readonly SortedSet _tree; diff --git a/src/libraries/System.Collections/src/System/Collections/Generic/Stack.cs b/src/libraries/System.Collections/src/System/Collections/Generic/Stack.cs index 2b4fa1e..345ed27 100644 --- a/src/libraries/System.Collections/src/System/Collections/Generic/Stack.cs +++ b/src/libraries/System.Collections/src/System/Collections/Generic/Stack.cs @@ -311,7 +311,6 @@ namespace System.Collections.Generic throw new InvalidOperationException(SR.InvalidOperation_EmptyStack); } - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "not an expected scenario")] public struct Enumerator : IEnumerator, System.Collections.IEnumerator { private readonly Stack _stack; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModelServices.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModelServices.cs index c218156..9114625 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModelServices.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModelServices.cs @@ -17,7 +17,6 @@ namespace System.ComponentModel.Composition { public static class AttributedModelServices { - [SuppressMessage("Microsoft.Design", "CA1004")] public static TMetadataView GetMetadataView(IDictionary metadata) { Requires.NotNull(metadata, nameof(metadata)); diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CatalogReflectionContextAttribute.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CatalogReflectionContextAttribute.cs index 7328e03..f5b4272 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CatalogReflectionContextAttribute.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CatalogReflectionContextAttribute.cs @@ -11,7 +11,6 @@ namespace System.ComponentModel.Composition /// /// Enables the AssemblyCatalog to discover user provided ReflectionContexts. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = true)] public class CatalogReflectionContextAttribute : Attribute { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExportAttribute.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExportAttribute.cs index ef5cc34..6387808 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExportAttribute.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExportAttribute.cs @@ -9,7 +9,6 @@ namespace System.ComponentModel.Composition /// /// Specifies that a type, property, field, or method provides a particular export. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true, Inherited = false)] public class ExportAttribute : Attribute diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExportServices.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExportServices.cs index f016f95..6552b48 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExportServices.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExportServices.cs @@ -83,7 +83,6 @@ namespace System.ComponentModel.Composition return (Func>)Delegate.CreateDelegate(typeof(Func>), genericMethod); } - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] internal static Lazy CreateStronglyTypedLazyOfTM(Export export) { if (export is IDisposable disposable) @@ -103,7 +102,6 @@ namespace System.ComponentModel.Composition } } - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] internal static Lazy CreateStronglyTypedLazyOfT(Export export) { if (export is IDisposable disposable) @@ -119,7 +117,6 @@ namespace System.ComponentModel.Composition } } - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] internal static Lazy CreateSemiStronglyTypedLazy(Export export) { if (export is IDisposable disposable) diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ApplicationCatalog.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ApplicationCatalog.cs index 8f583ba..8a31d54 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ApplicationCatalog.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ApplicationCatalog.cs @@ -200,7 +200,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// A containing a human-readable display name of the . /// - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] string ICompositionElement.DisplayName { get { return GetDisplayName(); } @@ -212,7 +211,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// This property always returns . /// - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] ICompositionElement? ICompositionElement.Origin { get { return null; } diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AssemblyCatalog.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AssemblyCatalog.cs index 4a9fe60..29b300a 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AssemblyCatalog.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AssemblyCatalog.cs @@ -479,7 +479,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// A containing a human-readable display name of the . /// - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] string ICompositionElement.DisplayName { get { return GetDisplayName(); } @@ -491,7 +490,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// This property always returns . /// - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] ICompositionElement? ICompositionElement.Origin { get { return null; } diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs index b7e606c..fedf72f 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs @@ -76,7 +76,6 @@ namespace System.ComponentModel.Composition.Hosting return TryGetValue(key, false, out value); } - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")] public bool TryGetValue(object key, bool localAtomicCompositionOnly, [MaybeNullWhen(false)] out T value) { ThrowIfDisposed(); diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.CatalogExport.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.CatalogExport.cs index 3fe8913..c2a2a56 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.CatalogExport.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.CatalogExport.cs @@ -60,7 +60,6 @@ namespace System.ComponentModel.Composition.Hosting return _catalogExportProvider.GetExportedValue(GetPart(), _definition, IsSharedPart); } - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] public static CatalogExport CreateExport(CatalogExportProvider catalogExportProvider, ComposablePartDefinition partDefinition, ExportDefinition definition, CreationPolicy importCreationPolicy) { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.cs index 9c06b88..825bdbf 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.cs @@ -149,7 +149,6 @@ namespace System.ComponentModel.Composition.Hosting /// This property must be set before accessing any methods on the /// . /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EnsureCanSet ensures that the property is set only once, Dispose is not required")] [DisallowNull] public ExportProvider? SourceProvider { @@ -397,7 +396,6 @@ namespace System.ComponentModel.Composition.Hosting return exports.ToArray(); } - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] private void OnCatalogChanging(object? sender, ComposablePartCatalogChangeEventArgs e) { using (var atomicComposition = new AtomicComposition(e.AtomicComposition)) diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ComposablePartExportProvider.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ComposablePartExportProvider.cs index 537865f..fef1c1d 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ComposablePartExportProvider.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ComposablePartExportProvider.cs @@ -127,7 +127,6 @@ namespace System.ComponentModel.Composition.Hosting /// This property must be set before accessing any methods on the /// . /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EnsureCanSet ensures that the property is set only once, Dispose is not required")] [DisallowNull] public ExportProvider? SourceProvider { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionContainer.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionContainer.cs index 17ac42c..e34ae08 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionContainer.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionContainer.cs @@ -413,7 +413,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// is . /// - [SuppressMessage("Microsoft.Performance", "CA1822")] public void ReleaseExport(Export export) { Requires.NotNull(export, nameof(export)); @@ -443,7 +442,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// is . /// - [SuppressMessage("Microsoft.Performance", "CA1822")] public void ReleaseExport(Lazy export) { Requires.NotNull(export, nameof(export)); @@ -486,7 +484,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// contains an element that is . /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public void ReleaseExports(IEnumerable> exports) { Requires.NotNullOrNullElements(exports, nameof(exports)); @@ -508,7 +505,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// contains an element that is . /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public void ReleaseExports(IEnumerable> exports) { Requires.NotNullOrNullElements(exports, nameof(exports)); diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs index a693744..16fffd4 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs @@ -782,7 +782,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// A containing a human-readable display name of the . /// - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] string ICompositionElement.DisplayName { get { return GetDisplayName(); } @@ -794,7 +793,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// This property always returns . /// - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] ICompositionElement? ICompositionElement.Origin { get { return null; } diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ExportProvider.GetExportOverrides.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ExportProvider.GetExportOverrides.cs index c986f2f..843e456 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ExportProvider.GetExportOverrides.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ExportProvider.GetExportOverrides.cs @@ -259,7 +259,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// The has been disposed of. /// - [SuppressMessage("Microsoft.Design", "CA1006")] public IEnumerable> GetExports(Type type, Type? metadataViewType, string? contractName) { IEnumerable exports = GetExportsCore(type, metadataViewType, contractName, ImportCardinality.ZeroOrMore); @@ -306,7 +305,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// The has been disposed of. /// - [SuppressMessage("Microsoft.Design", "CA1006")] public IEnumerable> GetExports() { return GetExports((string?)null); @@ -348,7 +346,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// The has been disposed of. /// - [SuppressMessage("Microsoft.Design", "CA1006")] public IEnumerable> GetExports(string? contractName) { return GetExportsCore(contractName); @@ -387,7 +384,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// The has been disposed of. /// - [SuppressMessage("Microsoft.Design", "CA1006")] public IEnumerable> GetExports() { return GetExports((string?)null); @@ -430,7 +426,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// The has been disposed of. /// - [SuppressMessage("Microsoft.Design", "CA1006")] public IEnumerable> GetExports(string? contractName) { return GetExportsCore(contractName); diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/TypeCatalog.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/TypeCatalog.cs index a272384..68c2f61 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/TypeCatalog.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/TypeCatalog.cs @@ -230,7 +230,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// A containing a human-readable display name of the . /// - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] string ICompositionElement.DisplayName { get { return GetDisplayName(); } @@ -242,7 +241,6 @@ namespace System.ComponentModel.Composition.Hosting /// /// This property always returns . /// - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] ICompositionElement? ICompositionElement.Origin { get { return null; } diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportAttribute.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportAttribute.cs index 73d0d65..ca047bc 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportAttribute.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportAttribute.cs @@ -10,7 +10,6 @@ namespace System.ComponentModel.Composition /// /// Specifies that a property, field, or parameter imports a particular export. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] public class ImportAttribute : Attribute, IAttributedImport diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportManyAttribute.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportManyAttribute.cs index 1653047..64ac5a4 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportManyAttribute.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportManyAttribute.cs @@ -10,7 +10,6 @@ namespace System.ComponentModel.Composition /// /// Specifies that a property, field, or parameter imports a particular set of exports. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] public class ImportManyAttribute : Attribute, IAttributedImport diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportingConstructorAttribute.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportingConstructorAttribute.cs index aae782b..a7443e2 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportingConstructorAttribute.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ImportingConstructorAttribute.cs @@ -14,7 +14,6 @@ namespace System.ComponentModel.Composition /// construct an attributed part. Use this attribute to indicate that a specific constructor /// should be used. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] public class ImportingConstructorAttribute : Attribute { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/InheritedExportAttribute.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/InheritedExportAttribute.cs index f28cb99..df05c49 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/InheritedExportAttribute.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/InheritedExportAttribute.cs @@ -9,7 +9,6 @@ namespace System.ComponentModel.Composition /// /// Specifies that a type or interface that provides a particular export. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)] public class InheritedExportAttribute : ExportAttribute { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/MetadataViewProvider.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/MetadataViewProvider.cs index ac61aa5..a1d4b4b 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/MetadataViewProvider.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/MetadataViewProvider.cs @@ -13,7 +13,6 @@ namespace System.ComponentModel.Composition { internal static class MetadataViewProvider { - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] public static TMetadataView GetMetadataView(IDictionary metadata) { if (metadata == null) diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartCatalog.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartCatalog.cs index 2e3a3c7..7060c1b 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartCatalog.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartCatalog.cs @@ -95,7 +95,6 @@ namespace System.ComponentModel.Composition.Primitives /// , return an empty . /// /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public virtual IEnumerable> GetExports(ImportDefinition definition) { ThrowIfDisposed(); diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ContractBasedImportDefinition.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ContractBasedImportDefinition.cs index 4d35ba1..4612c45 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ContractBasedImportDefinition.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ContractBasedImportDefinition.cs @@ -99,7 +99,6 @@ namespace System.ComponentModel.Composition.Primitives /// is not one of the /// values. /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public ContractBasedImportDefinition(string contractName, string? requiredTypeIdentity, IEnumerable>? requiredMetadata, ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, CreationPolicy requiredCreationPolicy) : this(contractName, requiredTypeIdentity, requiredMetadata, cardinality, isRecomposable, isPrerequisite, requiredCreationPolicy, MetadataServices.EmptyMetadata) @@ -161,7 +160,6 @@ namespace System.ComponentModel.Composition.Primitives /// is not one of the /// values. /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public ContractBasedImportDefinition(string contractName, string? requiredTypeIdentity, IEnumerable>? requiredMetadata, ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, CreationPolicy requiredCreationPolicy, IDictionary metadata) : base(contractName, cardinality, isRecomposable, isPrerequisite, metadata) @@ -207,7 +205,6 @@ namespace System.ComponentModel.Composition.Primitives /// return an empty instead. /// /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public virtual IEnumerable> RequiredMetadata { get diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/Export.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/Export.cs index d8a7e31..573e543 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/Export.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/Export.cs @@ -233,7 +233,6 @@ namespace System.ComponentModel.Composition.Primitives /// . /// /// - [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] protected virtual object? GetExportedValueCore() { if (_exportedValueGetter != null) diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs index abc2201..e9a1ca3 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs @@ -9,7 +9,6 @@ using Microsoft.Internal; namespace System.ComponentModel.Composition.Primitives { - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] public class ExportedDelegate { private readonly object? _instance; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ImportDefinition.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ImportDefinition.cs index 83ddadf..27210ed 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ImportDefinition.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ImportDefinition.cs @@ -79,7 +79,6 @@ namespace System.ComponentModel.Composition.Primitives /// is not one of the /// values. /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public ImportDefinition(Expression> constraint, string? contractName, ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite) : this(contractName, cardinality, isRecomposable, isPrerequisite, MetadataServices.EmptyMetadata) { @@ -88,7 +87,6 @@ namespace System.ComponentModel.Composition.Primitives _constraint = constraint; } - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public ImportDefinition(Expression> constraint, string? contractName, ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, IDictionary? metadata) : this(contractName, cardinality, isRecomposable, isPrerequisite, metadata) { @@ -200,7 +198,6 @@ namespace System.ComponentModel.Composition.Primitives /// Overriders of this property should never return . /// /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public virtual Expression> Constraint { get diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ImportingMember.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ImportingMember.cs index 3e7dfa2..fd8733b 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ImportingMember.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ImportingMember.cs @@ -188,7 +188,6 @@ namespace System.ComponentModel.Composition.ReflectionModel return CollectionServices.GetCollectionWrapper(itemType, collectionObject); } - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void EnsureCollectionIsWritable(ICollection? collection) { bool isReadOnly = true; @@ -221,7 +220,6 @@ namespace System.ComponentModel.Composition.ReflectionModel } } - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void PopulateCollection(ICollection collection, IEnumerable values) { if (collection == null) diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs index 3565756..3c22785 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs @@ -522,7 +522,6 @@ namespace System.ComponentModel.Composition.ReflectionModel return false; } - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void NotifyImportSatisfied() { if (_invokeImportsSatisfied) diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePartDefinition.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePartDefinition.cs index 5cce608..bb7791d 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePartDefinition.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePartDefinition.cs @@ -131,7 +131,6 @@ namespace System.ComponentModel.Composition.ReflectionModel } } - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] public override ComposablePart CreatePart() { if (IsDisposalRequired) diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionModelServices.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionModelServices.cs index 3b4b6b5..742d462 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionModelServices.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionModelServices.cs @@ -124,7 +124,6 @@ namespace System.ComponentModel.Composition.ReflectionModel return partCreatorImportDefinition.ProductImportDefinition; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ComposablePartDefinition CreatePartDefinition( Lazy partType, bool isDisposalRequired, @@ -145,7 +144,6 @@ namespace System.ComponentModel.Composition.ReflectionModel origin)); } - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ExportDefinition CreateExportDefinition( LazyMemberInfo exportingMember, string contractName, @@ -161,7 +159,6 @@ namespace System.ComponentModel.Composition.ReflectionModel origin); } - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ContractBasedImportDefinition CreateImportDefinition( LazyMemberInfo importingMember, string contractName, @@ -175,7 +172,6 @@ namespace System.ComponentModel.Composition.ReflectionModel return CreateImportDefinition(importingMember, contractName, requiredTypeIdentity, requiredMetadata, cardinality, isRecomposable, requiredCreationPolicy, MetadataServices.EmptyMetadata, false, origin); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ContractBasedImportDefinition CreateImportDefinition( LazyMemberInfo importingMember, string contractName, @@ -202,7 +198,6 @@ namespace System.ComponentModel.Composition.ReflectionModel origin); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ContractBasedImportDefinition CreateImportDefinition( LazyMemberInfo importingMember, string contractName, @@ -250,7 +245,6 @@ namespace System.ComponentModel.Composition.ReflectionModel } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ContractBasedImportDefinition CreateImportDefinition( Lazy parameter, string contractName, @@ -263,7 +257,6 @@ namespace System.ComponentModel.Composition.ReflectionModel return CreateImportDefinition(parameter, contractName, requiredTypeIdentity, requiredMetadata, cardinality, requiredCreationPolicy, MetadataServices.EmptyMetadata, false, origin); } - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public static ContractBasedImportDefinition CreateImportDefinition( Lazy parameter, string contractName, diff --git a/src/libraries/System.ComponentModel.Primitives/src/FxCopBaseline.cs b/src/libraries/System.ComponentModel.Primitives/src/FxCopBaseline.cs deleted file mode 100644 index 4175d27..0000000 --- a/src/libraries/System.ComponentModel.Primitives/src/FxCopBaseline.cs +++ /dev/null @@ -1,7 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ComponentModel.Component.#Dispose(System.Boolean)")] diff --git a/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj b/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj index 78bc218..53e44fa 100644 --- a/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj +++ b/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj @@ -35,9 +35,6 @@ - - - diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AmbientValueAttribute.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AmbientValueAttribute.cs index 9f26567..b68c466 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AmbientValueAttribute.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AmbientValueAttribute.cs @@ -10,7 +10,6 @@ namespace System.ComponentModel /// Specifies the ambient value for a property. The ambient value is the value you /// can set into a property to make it inherit its ambient. /// - [SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments")] [AttributeUsage(AttributeTargets.All)] public sealed class AmbientValueAttribute : Attribute { diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs index 5ee2e18..d7671a1 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs @@ -6,8 +6,6 @@ using System.Reflection; using System.Collections; using System.Diagnostics.CodeAnalysis; -[assembly: SuppressMessage("Microsoft.Security", "CA2112:SecuredTypesShouldNotExposeFields", Scope = "type", Target = "System.ComponentModel.AttributeCollection")] - namespace System.ComponentModel { /// @@ -121,7 +119,6 @@ namespace System.ComponentModel /// /// Gets the attributes collection. /// - [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Matches constructor input type")] protected virtual Attribute[] Attributes => _attributes; /// diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeProviderAttribute.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeProviderAttribute.cs index d1c8cf7..f6124b1 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeProviderAttribute.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeProviderAttribute.cs @@ -6,7 +6,6 @@ using System.Diagnostics.CodeAnalysis; namespace System.ComponentModel { - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Property)] public class AttributeProviderAttribute : Attribute { diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs index e299b27..8af3871 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/BindingList.cs @@ -9,8 +9,6 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -[assembly: SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Scope = "type", Target = "System.ComponentModel.BindingList`1")] - namespace System.ComponentModel { [Serializable] @@ -305,7 +303,6 @@ namespace System.ComponentModel /// supply a custom item to add to the list. Otherwise an item of type T is created. /// The new item is then added to the end of the list. /// - [SuppressMessage("Microsoft.Security", "CA2113:SecureLateBindingMethods")] protected virtual object AddNewCore() { // Allow event handler to supply the new item for us diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerOptionService.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerOptionService.cs index 599153f..f80f2c0 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerOptionService.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerOptionService.cs @@ -225,7 +225,6 @@ namespace System.ComponentModel.Design /// public DesignerOptionCollection this[int index] { - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters")] get { EnsurePopulated(); diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerVerb.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerVerb.cs index 8751c70..297cbc3 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerVerb.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesignerVerb.cs @@ -15,7 +15,6 @@ namespace System.ComponentModel.Design /// /// Initializes a new instance of the class. /// - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public DesignerVerb(string text, EventHandler handler) : base(handler, StandardCommands.VerbFirst) { Properties["Text"] = text == null ? null : Regex.Replace(text, @"\(\&.\)", ""); @@ -25,7 +24,6 @@ namespace System.ComponentModel.Design /// Initializes a new instance of the /// class. /// - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public DesignerVerb(string text, EventHandler handler, CommandID startCommandID) : base(handler, startCommandID) { Properties["Text"] = text == null ? null : Regex.Replace(text, @"\(\&.\)", ""); diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs index ff50426..82a1f3b 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs @@ -30,7 +30,6 @@ namespace System.ComponentModel.Design formatter.Serialize(o, new object[] { cryptoKey, context._savedLicenseKeys }); } - [SuppressMessage("Microsoft.Security", "CA2107:ReviewDenyAndPermitOnlyUsage")] // Use of PermitOnly here is appropriate. internal static void Deserialize(Stream o, string cryptoKey, RuntimeLicenseContext context) { IFormatter formatter = new BinaryFormatter(); diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/MenuCommand.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/MenuCommand.cs index 9f16502..77b3e5d 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/MenuCommand.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/MenuCommand.cs @@ -157,7 +157,6 @@ namespace System.ComponentModel.Design /// Provides notification and is called in response to /// a event. /// - [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")] // Safe: FullTrust LinkDemand to instantiate an object of this class. protected virtual void OnCommandChanged(EventArgs e) => CommandChanged?.Invoke(this, e); /// diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/PropertyTabAttribute.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/PropertyTabAttribute.cs index a85b08a..6d0860e 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/PropertyTabAttribute.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/PropertyTabAttribute.cs @@ -5,8 +5,6 @@ using System.Diagnostics.CodeAnalysis; using System.Reflection; -[assembly: SuppressMessage("Microsoft.Security", "CA2113:SecureLateBindingMethods", Scope = "member", Target = "System.ComponentModel.PropertyTabAttribute.get_TabClasses():System.Type[]")] - namespace System.ComponentModel { /// diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/Serialization/MemberRelationshipService.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/Serialization/MemberRelationshipService.cs index 3ea1fac..c5bceb6 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/Serialization/MemberRelationshipService.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/Serialization/MemberRelationshipService.cs @@ -35,7 +35,6 @@ namespace System.ComponentModel.Design.Serialization /// can also be passed as the property value, in which case the relationship will /// be cleared. /// - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] public MemberRelationship this[MemberRelationship source] { get @@ -71,7 +70,6 @@ namespace System.ComponentModel.Design.Serialization /// Also sets a relationship between two objects. Null can be passed as the property value, in which /// case the relationship will be cleared. /// - [SuppressMessage("Microsoft.Design", "CA1023:IndexersShouldNotBeMultidimensional")] public MemberRelationship this[object sourceOwner, MemberDescriptor sourceMember] { get diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/EventDescriptorCollection.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/EventDescriptorCollection.cs index ee6b5fe..49249ce 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/EventDescriptorCollection.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/EventDescriptorCollection.cs @@ -7,8 +7,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -[assembly: SuppressMessage("Microsoft.Security", "CA2112:SecuredTypesShouldNotExposeFields", Scope = "type", Target = "System.ComponentModel.EventDescriptorCollection")] - namespace System.ComponentModel { /// diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IBindingList.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IBindingList.cs index dab1d19..106ae55 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IBindingList.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IBindingList.cs @@ -5,8 +5,6 @@ using System.Collections; using System.Diagnostics.CodeAnalysis; -[assembly: SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Scope = "type", Target = "System.ComponentModel.IBindingList")] - namespace System.ComponentModel { public interface IBindingList : IList diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IBindingListView.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IBindingListView.cs index 79031f8..71e99da 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IBindingListView.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IBindingListView.cs @@ -6,7 +6,6 @@ using System.Diagnostics.CodeAnalysis; namespace System.ComponentModel { - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] public interface IBindingListView : IBindingList { void ApplySort(ListSortDescriptionCollection sorts); diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IIntellisenseBuilder.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IIntellisenseBuilder.cs index 85c0407..9b804c6 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IIntellisenseBuilder.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/IIntellisenseBuilder.cs @@ -21,7 +21,6 @@ namespace System.ComponentModel /// value - expression being edited /// newValue - return the new value /// - [SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference")] bool Show(string language, string value, ref string newValue); } } diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/InstallerTypeAttribute.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/InstallerTypeAttribute.cs index ba482a8..61edcc5 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/InstallerTypeAttribute.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/InstallerTypeAttribute.cs @@ -4,8 +4,6 @@ using System.Diagnostics.CodeAnalysis; -[assembly: SuppressMessage("Microsoft.Security", "CA2113:SecureLateBindingMethods", Scope = "member", Target = "System.ComponentModel.InstallerTypeAttribute.get_InstallerType():System.Type")] - namespace System.ComponentModel { /// diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseException.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseException.cs index de6c169..c027d8f 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseException.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseException.cs @@ -13,7 +13,6 @@ namespace System.ComponentModel /// [Serializable] [TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - [SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")] // must not, a Type is required in all constructors. public class LicenseException : SystemException { private const int LicenseHResult = unchecked((int)0x80131901); diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseProviderAttribute.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseProviderAttribute.cs index 18631cf..de1b274 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseProviderAttribute.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicenseProviderAttribute.cs @@ -52,7 +52,6 @@ namespace System.ComponentModel /// public Type LicenseProvider { - [SuppressMessage("Microsoft.Security", "CA2113:SecureLateBindingMethods")] get { if (_licenseProviderType == null && _licenseProviderName != null) diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ListChangedEventArgs.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ListChangedEventArgs.cs index 33669a2..7d1a3a4 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ListChangedEventArgs.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ListChangedEventArgs.cs @@ -5,9 +5,6 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.ComponentModel.ListChangedEventArgs..ctor(System.ComponentModel.ListChangedType,System.Int32,System.ComponentModel.PropertyDescriptor)")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.ComponentModel.ListChangedEventArgs..ctor(System.ComponentModel.ListChangedType,System.ComponentModel.PropertyDescriptor)")] - namespace System.ComponentModel { public class ListChangedEventArgs : EventArgs diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MarshalByValueComponent.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MarshalByValueComponent.cs index 5149b75..5538f60 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MarshalByValueComponent.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MarshalByValueComponent.cs @@ -60,7 +60,6 @@ namespace System.ComponentModel /// /// Disposes of the resources (other than memory) used by the component. /// - [SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed")] public void Dispose() { Dispose(true); diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs index bdfdfaa..f60ac9f 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs @@ -468,7 +468,6 @@ namespace System.ComponentModel /// Derived classes can override this method and call base.Clone to get proper cloning semantics but must /// implement the full-parameter constructor (passing parameters to the base constructor as well). /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2113:SecureLateBindingMethods")] public object Clone() { MaskedTextProvider clonedProvider; @@ -1177,7 +1176,6 @@ namespace System.ComponentModel /// from the specified position included. /// Returns InvalidIndex if it doesn't find one. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2233:OperationsShouldNotOverflow")] public int FindUnassignedEditPositionInRange(int startPosition, int endPosition, bool direction) { int position; diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MultilineStringConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MultilineStringConverter.cs index cb3d17a..4bcf0ac 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MultilineStringConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MultilineStringConverter.cs @@ -9,7 +9,6 @@ namespace System.ComponentModel /// /// Provides a type converter to convert multiline strings to a simple string. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] public class MultilineStringConverter : TypeConverter { /// diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs index ca110bf..e0128a7 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs @@ -378,7 +378,6 @@ namespace System.ComponentModel /// This should be called by your property descriptor implementation /// when the property value has changed. /// - [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")] protected virtual void OnValueChanged(object component, EventArgs e) { if (component != null) diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptorCollection.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptorCollection.cs index 1479542..2a2d2a3 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptorCollection.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptorCollection.cs @@ -7,11 +7,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", Scope = "member", Target = "System.ComponentModel.PropertyDescriptorCollection.System.Collections.IDictionary.Add(System.Object,System.Object):System.Void")] -[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", Scope = "member", Target = "System.ComponentModel.PropertyDescriptorCollection.System.Collections.IList.set_Item(System.Int32,System.Object):System.Void")] -[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", Scope = "member", Target = "System.ComponentModel.PropertyDescriptorCollection.System.Collections.IDictionary.set_Item(System.Object,System.Object):System.Void")] -[assembly: SuppressMessage("Microsoft.Security", "CA2112:SecuredTypesShouldNotExposeFields", Scope = "type", Target = "System.ComponentModel.PropertyDescriptorCollection")] - namespace System.ComponentModel { /// @@ -22,7 +17,6 @@ namespace System.ComponentModel /// /// An empty PropertyDescriptorCollection that can used instead of creating a new one with no items. /// - [SuppressMessage("Microsoft.Security", "CA2112:SecuredTypesShouldNotExposeFields")] public static readonly PropertyDescriptorCollection Empty = new PropertyDescriptorCollection(null, true); private IDictionary _cachedFoundProperties; diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ToolboxItemAttribute.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ToolboxItemAttribute.cs index 588729c..28cb56f 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ToolboxItemAttribute.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ToolboxItemAttribute.cs @@ -4,8 +4,6 @@ using System.Diagnostics.CodeAnalysis; -[assembly: SuppressMessage("Microsoft.Security", "CA2113:SecureLateBindingMethods", Scope = "member", Target = "System.ComponentModel.ToolboxItemAttribute.get_ToolboxItemType():System.Type")] - namespace System.ComponentModel { /// diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeConverter.cs index 046d5fd..ed74644 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeConverter.cs @@ -146,7 +146,6 @@ namespace System.ComponentModel /// /// Converts the specified value to a culture-invariant string representation. /// - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] public string ConvertToInvariantString(ITypeDescriptorContext context, object value) { return ConvertToString(context, CultureInfo.InvariantCulture, value); diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs index b63ab0d..6d91d41 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs @@ -2598,8 +2598,6 @@ namespace System.ComponentModel /// Implements GetTypeDescriptor. This creates a custom type /// descriptor that walks the linked list for each of its calls. /// - - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters")] public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance) { if (objectType == null) @@ -3163,7 +3161,6 @@ namespace System.ComponentModel /// Implements GetTypeDescriptor. This creates a custom type /// descriptor that walks the linked list for each of its calls. /// - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters")] public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance) { if (objectType == null) diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/ColorConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/ColorConverter.cs index a9d727b..2a83103 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/ColorConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/ColorConverter.cs @@ -36,7 +36,6 @@ namespace System.Drawing return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string strValue) diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/PointConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/PointConverter.cs index 5197af3..55a9cf1 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/PointConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/PointConverter.cs @@ -23,7 +23,6 @@ namespace System.Drawing return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string strValue) @@ -103,8 +102,6 @@ namespace System.Drawing return base.ConvertTo(context, culture, value, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] - [SuppressMessage("Microsoft.Security", "CA2102:CatchNonClsCompliantExceptionsInGeneralHandlers")] public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues) { if (propertyValues == null) diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/RectangleConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/RectangleConverter.cs index 6dd107f..1c4cf21 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/RectangleConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/RectangleConverter.cs @@ -23,7 +23,6 @@ namespace System.Drawing return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string strValue) @@ -106,8 +105,6 @@ namespace System.Drawing return base.ConvertTo(context, culture, value, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] - [SuppressMessage("Microsoft.Security", "CA2102:CatchNonClsCompliantExceptionsInGeneralHandlers")] public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues) { if (propertyValues == null) diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/SizeConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/SizeConverter.cs index 9592c8f..9c0eefe 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/SizeConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/SizeConverter.cs @@ -23,7 +23,6 @@ namespace System.Drawing return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string strValue) @@ -101,8 +100,6 @@ namespace System.Drawing return base.ConvertTo(context, culture, value, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] - [SuppressMessage("Microsoft.Security", "CA2102:CatchNonClsCompliantExceptionsInGeneralHandlers")] public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues) { if (propertyValues == null) diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/SizeFConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/SizeFConverter.cs index 3eafc99..1bb8a86 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/SizeFConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/Drawing/SizeFConverter.cs @@ -23,7 +23,6 @@ namespace System.Drawing return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string strValue) @@ -60,7 +59,6 @@ namespace System.Drawing return base.ConvertFrom(context, culture, value); } - [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == null) @@ -99,7 +97,6 @@ namespace System.Drawing return base.ConvertTo(context, culture, value, destinationType); } - [SuppressMessage("Microsoft.Performance", "CA1808:AvoidCallsThatBoxValueTypes")] public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues) { if (propertyValues == null) diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/Resources/TestResx.Designer.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/Resources/TestResx.Designer.cs index 5de9c6b..809ece1 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/Resources/TestResx.Designer.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/Resources/TestResx.Designer.cs @@ -29,7 +29,6 @@ namespace Resources { private static global::System.Globalization.CultureInfo resourceCulture; - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TestResx() { } diff --git a/src/libraries/System.Composition.AttributedModel/src/System/Composition/ExportAttribute.cs b/src/libraries/System.Composition.AttributedModel/src/System/Composition/ExportAttribute.cs index 7a6602b..319384b 100644 --- a/src/libraries/System.Composition.AttributedModel/src/System/Composition/ExportAttribute.cs +++ b/src/libraries/System.Composition.AttributedModel/src/System/Composition/ExportAttribute.cs @@ -9,7 +9,6 @@ namespace System.Composition /// /// Specifies that a type, property, field, or method provides a particular export. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true, Inherited = false)] public class ExportAttribute : Attribute diff --git a/src/libraries/System.Composition.AttributedModel/src/System/Composition/ImportAttribute.cs b/src/libraries/System.Composition.AttributedModel/src/System/Composition/ImportAttribute.cs index a709cfa..38bce0e 100644 --- a/src/libraries/System.Composition.AttributedModel/src/System/Composition/ImportAttribute.cs +++ b/src/libraries/System.Composition.AttributedModel/src/System/Composition/ImportAttribute.cs @@ -9,7 +9,6 @@ namespace System.Composition /// /// Specifies that a property, field, or parameter imports a particular export. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] public class ImportAttribute : Attribute diff --git a/src/libraries/System.Composition.AttributedModel/src/System/Composition/ImportManyAttribute.cs b/src/libraries/System.Composition.AttributedModel/src/System/Composition/ImportManyAttribute.cs index 5db7370..2e260d0 100644 --- a/src/libraries/System.Composition.AttributedModel/src/System/Composition/ImportManyAttribute.cs +++ b/src/libraries/System.Composition.AttributedModel/src/System/Composition/ImportManyAttribute.cs @@ -9,7 +9,6 @@ namespace System.Composition /// /// Specifies that a property, field, or parameter imports a particular set of exports. /// - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] public class ImportManyAttribute : Attribute diff --git a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Core/ExportDescriptorProvider.cs b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Core/ExportDescriptorProvider.cs index 4820ae4..c3db3f3 100644 --- a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Core/ExportDescriptorProvider.cs +++ b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Core/ExportDescriptorProvider.cs @@ -19,19 +19,16 @@ namespace System.Composition.Hosting.Core /// /// Constant value provided so that subclasses can avoid creating additional duplicate values. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] protected static readonly IEnumerable NoExportDescriptors = Enumerable.Empty(); /// /// Constant value provided so that subclasses can avoid creating additional duplicate values. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] protected static readonly IDictionary NoMetadata = new ReadOnlyDictionary(new Dictionary()); /// /// Constant value provided so that subclasses can avoid creating additional duplicate values. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] protected static readonly Func> NoDependencies = () => Enumerable.Empty(); /// diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/Resources/Strings.Designer.cs b/src/libraries/System.Configuration.ConfigurationManager/tests/Resources/Strings.Designer.cs index b551785..765402a 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/Resources/Strings.Designer.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/Resources/Strings.Designer.cs @@ -29,7 +29,6 @@ namespace Resources { private static global::System.Globalization.CultureInfo resourceCulture; - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Strings() { } diff --git a/src/libraries/System.Console/src/FxCopBaseline.cs b/src/libraries/System.Console/src/FxCopBaseline.cs deleted file mode 100644 index a5fac4a..0000000 --- a/src/libraries/System.Console/src/FxCopBaseline.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#Dispose(System.Boolean)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#Peek():System.Int32")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#Read():System.Int32")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#Read(System.Char[],System.Int32,System.Int32):System.Int32")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#ReadBlock(System.Char[],System.Int32,System.Int32):System.Int32")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#ReadLine():System.String")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#ReadToEnd():System.String")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#ReadKey(System.Boolean&):System.ConsoleKeyInfo")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#get_KeyAvailable():System.Boolean")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#ResetColor()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#TryGetCursorPosition(System.Int32&,System.Int32&,System.Boolean):System.Boolean")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#RefreshColors(System.ConsoleColor&,System.ConsoleColor)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#EnsureInitializedCore()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#WriteStdoutAnsiString(System.String,System.Boolean)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#ForegroundColor")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#BackgroundColor")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#SetCursorPosition(System.Int32,System.Int32)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#GetWindowSize(System.Int32&,System.Int32&)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#UpdatedCachedCursorPosition(System.Byte*,System.Int32,System.Int32)")] diff --git a/src/libraries/System.Console/src/System.Console.csproj b/src/libraries/System.Console/src/System.Console.csproj index 79f3023..c24b37c 100644 --- a/src/libraries/System.Console/src/System.Console.csproj +++ b/src/libraries/System.Console/src/System.Console.csproj @@ -7,9 +7,6 @@ enable - - - diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs index 4d85b61..87d3e1a 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs @@ -882,7 +882,6 @@ namespace System.Data.Odbc } // suppress this message - we cannot use SafeHandle here. Also, see notes in the code (VSTFDEVDIV# 560355) - [SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive")] protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) { DbTransaction transaction = InnerConnection.BeginTransaction(isolationLevel); diff --git a/src/libraries/System.Data.OleDb/src/OleDbConnection.cs b/src/libraries/System.Data.OleDb/src/OleDbConnection.cs index 3a9a17c..acf111f 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbConnection.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbConnection.cs @@ -366,7 +366,6 @@ namespace System.Data.OleDb } // suppress this message - we cannot use SafeHandle here. - [SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive")] protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) { DbTransaction transaction = InnerConnection.BeginTransaction(isolationLevel); diff --git a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs index d0a8669..aaba1be 100644 --- a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs +++ b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs @@ -1104,7 +1104,6 @@ namespace System.Data.ProviderBase return false; } - [SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods")] // copied from Triaged.cs private bool TryGetConnection(DbConnection owningObject, uint waitForMultipleObjectsTimeout, bool allowCreate, bool onlyOneCheckConnection, DbConnectionOptions userOptions, out DbConnectionInternal connection) { DbConnectionInternal obj = null; diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventMetadata.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventMetadata.cs index 1da0bfa..d28d2ea 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventMetadata.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventMetadata.cs @@ -64,7 +64,6 @@ namespace System.Diagnostics.Eventing.Reader } } - [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Opcode", Justification = "matell: Shipped public in 3.5, breaking change to fix now.")] public EventOpcode Opcode { get diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventOpcode.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventOpcode.cs index 1119771..987b07b 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventOpcode.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventOpcode.cs @@ -11,7 +11,6 @@ namespace System.Diagnostics.Eventing.Reader /// The metadata for a specific Opcode defined by a Provider. /// An instance of this class is obtained from a ProviderMetadata object. /// - [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Opcode", Justification = "matell: Shipped public in 3.5, breaking change to fix now.")] public sealed class EventOpcode { private readonly int _value; diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecord.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecord.cs index 65d7c38..dfb6567 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecord.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecord.cs @@ -18,7 +18,6 @@ namespace System.Diagnostics.Eventing.Reader public abstract byte? Level { get; } public abstract int? Task { get; } - [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Opcode", Justification = "matell: Shipped public in 3.5, breaking change to fix now.")] public abstract short? Opcode { get; } public abstract long? Keywords { get; } @@ -43,7 +42,6 @@ namespace System.Diagnostics.Eventing.Reader public abstract string LevelDisplayName { get; } - [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Opcode", Justification = "matell: Shipped public in 3.5, breaking change to fix now.")] public abstract string OpcodeDisplayName { get; } public abstract string TaskDisplayName { get; } public abstract IEnumerable KeywordsDisplayNames { get; } diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs index b77b4d7..0464e2f 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs @@ -436,7 +436,6 @@ namespace System.Diagnostics.Eventing.Reader } } - [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Opcodes", Justification = "matell: Shipped public in 3.5, breaking change to fix now.")] public IList Opcodes { get diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/Winmeta.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/Winmeta.cs index 98a4005..95bffd3 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/Winmeta.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/Winmeta.cs @@ -51,7 +51,6 @@ namespace System.Diagnostics.Eventing.Reader /// /// EventOpcode /// - [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Opcode", Justification = "matell: Shipped public in 3.5, breaking change to fix now.")] public enum StandardEventOpcode { /// diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PrivilegedConfigurationManager.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PrivilegedConfigurationManager.cs index 017b0f2..885a54c 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PrivilegedConfigurationManager.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PrivilegedConfigurationManager.cs @@ -9,7 +9,6 @@ namespace System.Configuration { internal static class PrivilegedConfigurationManager { internal static ConnectionStringSettingsCollection ConnectionStrings { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] get { return ConfigurationManager.ConnectionStrings; } diff --git a/src/libraries/System.Diagnostics.Process/src/FxCopBaseline.cs b/src/libraries/System.Diagnostics.Process/src/FxCopBaseline.cs deleted file mode 100644 index 1d3b620..0000000 --- a/src/libraries/System.Diagnostics.Process/src/FxCopBaseline.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.Process.#EnsureWatchingForExit()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.Process.#RaiseOnExited()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.Process.#StopWatchingForExit()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.Process.#CompletionCallback(System.Object,System.Boolean)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.Process.Close()")] \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj b/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj index 0948222..24550f4 100644 --- a/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj +++ b/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj @@ -13,9 +13,6 @@ $(NoWarn);0649 - - - diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/FxCopBaseline.cs b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/FxCopBaseline.cs deleted file mode 100644 index d7c7e4f..0000000 --- a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/FxCopBaseline.cs +++ /dev/null @@ -1,7 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.DelimitedListTraceListener.#set_Delimiter(System.String)")] diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj index 5747595..f326d86 100644 --- a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj +++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj @@ -5,9 +5,6 @@ $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix - - - diff --git a/src/libraries/System.Diagnostics.TraceSource/src/FxCopBaseline.cs b/src/libraries/System.Diagnostics.TraceSource/src/FxCopBaseline.cs deleted file mode 100644 index 89cdfb8..0000000 --- a/src/libraries/System.Diagnostics.TraceSource/src/FxCopBaseline.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#Flush()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#Fail(System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#Fail(System.String,System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#TraceEvent(System.Diagnostics.TraceEventType,System.Int32,System.String,System.Object[])")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#Write(System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#Write(System.String,System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#Write(System.Object)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#Write(System.Object,System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#WriteLine(System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#WriteLine(System.String,System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#WriteLine(System.Object)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceInternal.#WriteLine(System.Object,System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceSource.#Flush()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceSource.#TraceEvent(System.Diagnostics.TraceEventType,System.Int32)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceSource.#TraceEvent(System.Diagnostics.TraceEventType,System.Int32,System.String)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceSource.#TraceEvent(System.Diagnostics.TraceEventType,System.Int32,System.String,System.Object[])")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceSource.#TraceData(System.Diagnostics.TraceEventType,System.Int32,System.Object)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceSource.#TraceData(System.Diagnostics.TraceEventType,System.Int32,System.Object[])")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Diagnostics.TraceSource.#TraceTransfer(System.Int32,System.String,System.Guid)")] diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj b/src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj index ffe75a98..65fa321 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj +++ b/src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj @@ -6,9 +6,6 @@ $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX - - - diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/Switch.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/Switch.cs index 2b77b37..4d1e261 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/Switch.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/Switch.cs @@ -34,7 +34,6 @@ namespace System.Diagnostics private object InitializedLock { - [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "Reviewed for thread-safety")] get { if (_initializedLock == null) @@ -140,7 +139,6 @@ namespace System.Diagnostics /// protected int SwitchSetting { - [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "reviewed for thread-safety")] get { if (!_initialized) @@ -150,7 +148,6 @@ namespace System.Diagnostics } return _switchSetting; } - [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "reviewed for thread-safety")] set { bool didUpdate = false; diff --git a/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs b/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs index 9a23804..e46c9b8 100644 --- a/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs +++ b/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs @@ -68,7 +68,6 @@ namespace System.IO.Compression /// If the file exists and is not a Zip file, a ZipArchiveException will be thrown. /// If the file exists and is empty or does not exist, a new Zip file will be created. /// Note that creating a Zip file with the ZipArchiveMode.Create mode is more efficient when creating a new Zip file. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] // See comment in the body. public static ZipArchive Open(string archiveFileName, ZipArchiveMode mode) => Open(archiveFileName, mode, entryNameEncoding: null); /// @@ -145,7 +144,6 @@ namespace System.IO.Compression /// Note that Unicode encodings other than UTF-8 may not be currently used for the entryNameEncoding, /// otherwise an is thrown. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] // See comment in the body. public static ZipArchive Open(string archiveFileName, ZipArchiveMode mode, Encoding? entryNameEncoding) { // Relies on FileStream's ctor for checking of archiveFileName diff --git a/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs index 063fc39..e48c9e7 100644 --- a/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs @@ -10,7 +10,6 @@ using System.Text; namespace System.IO.Compression { // The disposable fields that this class owns get disposed when the ZipArchive it belongs to gets disposed - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] public partial class ZipArchiveEntry { // The maximum index of our buffers, from the maximum index of a byte array diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs index 79e3c5e..9a69d22 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs @@ -472,7 +472,6 @@ namespace System.IO /// /// Raises the event. /// - [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#", Justification = "Changing from protected to private would be a breaking change")] protected void OnChanged(FileSystemEventArgs e) { InvokeOn(e, _onChangedHandler); @@ -481,7 +480,6 @@ namespace System.IO /// /// Raises the event. /// - [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#", Justification = "Changing from protected to private would be a breaking change")] protected void OnCreated(FileSystemEventArgs e) { InvokeOn(e, _onCreatedHandler); @@ -490,7 +488,6 @@ namespace System.IO /// /// Raises the event. /// - [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#", Justification = "Changing from protected to private would be a breaking change")] protected void OnDeleted(FileSystemEventArgs e) { InvokeOn(e, _onDeletedHandler); @@ -511,7 +508,6 @@ namespace System.IO /// /// Raises the event. /// - [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#", Justification = "Changing from protected to private would be a breaking change")] protected void OnError(ErrorEventArgs e) { ErrorEventHandler? handler = _onErrorHandler; @@ -528,7 +524,6 @@ namespace System.IO /// /// Raises the event. /// - [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", MessageId = "0#", Justification = "Changing from protected to private would be a breaking change")] protected void OnRenamed(RenamedEventArgs e) { RenamedEventHandler? handler = _onRenamedHandler; diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/AnonymousPipeClientStream.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/AnonymousPipeClientStream.cs index 77bd42e..94057cc 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/AnonymousPipeClientStream.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/AnonymousPipeClientStream.cs @@ -13,13 +13,11 @@ namespace System.IO.Pipes /// public sealed partial class AnonymousPipeClientStream : PipeStream { - [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "string", Justification = "By design")] public AnonymousPipeClientStream(string pipeHandleAsString) : this(PipeDirection.In, pipeHandleAsString) { } - [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "string", Justification = "By design")] public AnonymousPipeClientStream(PipeDirection direction, string pipeHandleAsString) : base(direction, 0) { diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/AnonymousPipeServerStream.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/AnonymousPipeServerStream.cs index ea0f58f..1834f98 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/AnonymousPipeServerStream.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/AnonymousPipeServerStream.cs @@ -88,7 +88,6 @@ namespace System.IO.Pipes // This method should exist until we add a first class way of passing handles between parent and child // processes. For now, people do it via command line arguments. - [SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle", Justification = "By design")] public string GetClientHandleAsString() { _clientHandleExposed = true; diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Unix.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Unix.cs index 584a69b..cfee043 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Unix.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Unix.cs @@ -69,7 +69,6 @@ namespace System.IO.Pipes public int NumberOfServerInstances { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] get { CheckPipePropertyOperations(); diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Windows.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Windows.cs index e1d28d7..b6689f7 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Windows.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Windows.cs @@ -110,7 +110,6 @@ namespace System.IO.Pipes public unsafe int NumberOfServerInstances { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] get { CheckPipePropertyOperations(); diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs index 7a988f4..994296f 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs @@ -135,7 +135,6 @@ namespace System.IO.Pipes // was called (but not before this server is been created, or, if we were servicing another client, // not before we called Disconnect), in which case, there may be some buffer already in the pipe waiting // for us to read. See NamedPipeClientStream.Connect for more information. - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] public void WaitForConnection() { CheckConnectOperationsServerWithHandle(); diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.cs index d4cae06..51e7372 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.cs @@ -184,7 +184,6 @@ namespace System.IO.Pipes TaskToApm.End(asyncResult); // Server can only connect from Disconnected state - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Consistent with security model")] private void CheckConnectOperationsServer() { // we're not checking whether already connected; this allows us to throw IOException diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs index 10556bc..96994ab 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs @@ -237,7 +237,6 @@ namespace System.IO.Pipes // override this in cases where only one mode is legal (such as anonymous pipes) public virtual PipeTransmissionMode TransmissionMode { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] get { CheckPipePropertyOperations(); @@ -249,7 +248,6 @@ namespace System.IO.Pipes // access. If that passes, call to GetNamedPipeInfo will succeed. public virtual int InBufferSize { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] get { CheckPipePropertyOperations(); @@ -267,7 +265,6 @@ namespace System.IO.Pipes // the ctor. public virtual int OutBufferSize { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] get { CheckPipePropertyOperations(); @@ -286,7 +283,6 @@ namespace System.IO.Pipes CheckPipePropertyOperations(); return PipeTransmissionMode.Byte; // Unix pipes are only byte-based, not message-based } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] set { CheckPipePropertyOperations(); diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs index c79bdc7..8a9a34e 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs @@ -198,7 +198,6 @@ namespace System.IO.Pipes // override this in cases where only one mode is legal (such as anonymous pipes) public unsafe virtual PipeTransmissionMode TransmissionMode { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] get { CheckPipePropertyOperations(); @@ -230,7 +229,6 @@ namespace System.IO.Pipes // access. If that passes, call to GetNamedPipeInfo will succeed. public unsafe virtual int InBufferSize { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] get { CheckPipePropertyOperations(); @@ -255,7 +253,6 @@ namespace System.IO.Pipes // the ctor. public unsafe virtual int OutBufferSize { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] get { CheckPipePropertyOperations(); @@ -293,7 +290,6 @@ namespace System.IO.Pipes } return _readMode; } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] set { // Nothing fancy here. This is just a wrapper around the Win32 API. Note, that NamedPipeServerStream diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs index b8e684d..b2d786b 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs @@ -424,7 +424,6 @@ namespace System.IO.Pipes // message, otherwise it is set to true. public bool IsMessageComplete { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] get { // omitting pipe broken exception to allow reader to finish getting message @@ -465,7 +464,6 @@ namespace System.IO.Pipes public SafePipeHandle SafePipeHandle { - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Security model of pipes: demand at creation but no subsequent demands")] get { if (_handle == null) diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs index 56cf3b7..487b8b5 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs @@ -1581,7 +1581,6 @@ namespace System.IO.Ports } // This is the blocking method that waits for an event to occur. It wraps the SDK's WaitCommEvent function. - [SuppressMessage("Microsoft.Interoperability", "CA1404:CallGetLastErrorImmediatelyAfterPInvoke", Justification = "this is debug-only code")] internal unsafe void WaitForCommEvent() { int unused = 0; diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/BinaryOperationBinder.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/BinaryOperationBinder.cs index 1c26e42..d0a7053 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/BinaryOperationBinder.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/BinaryOperationBinder.cs @@ -75,7 +75,6 @@ namespace System.Dynamic /// internal override sealed bool IsStandardBinder => true; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] internal static bool OperationIsValid(ExpressionType operation) { switch (operation) diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/BindingRestrictions.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/BindingRestrictions.cs index 54425b6..12d2aaa 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/BindingRestrictions.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/BindingRestrictions.cs @@ -21,7 +21,6 @@ namespace System.Dynamic /// /// Represents an empty set of binding restrictions. This field is read-only. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] public static readonly BindingRestrictions Empty = new CustomRestriction(AstUtils.Constant(true)); private const int TypeRestrictionHash = 0b_0100_1001_0010_0100_1001_0010_0100_1001; diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/ConvertBinder.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/ConvertBinder.cs index 7fddcbf..ac7ac07 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/ConvertBinder.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/ConvertBinder.cs @@ -27,7 +27,6 @@ namespace System.Dynamic /// /// The type to convert to. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] public Type Type { get; } /// diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObject.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObject.cs index 150d3d4..05274c0 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObject.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObject.cs @@ -17,7 +17,6 @@ namespace System.Dynamic /// /// Represents an empty array of type . This field is read-only. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2105:ArrayFieldsShouldNotBeReadOnly")] public static readonly DynamicMetaObject[] EmptyMetaObjects = Array.Empty(); /// @@ -246,7 +245,6 @@ namespace System.Dynamic /// Returns the enumeration of all dynamic member names. /// /// The list of dynamic member names. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] public virtual IEnumerable GetDynamicMemberNames() => Array.Empty(); /// diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObjectBinder.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObjectBinder.cs index 9e9390e..08b2f28 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObjectBinder.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicMetaObjectBinder.cs @@ -176,7 +176,6 @@ namespace System.Dynamic /// /// The Type property of the resulting expression; any type is allowed. /// The update expression. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] public Expression GetUpdateExpression(Type type) { return Expression.Goto(CallSiteBinder.UpdateLabel, type); diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs index dca9930..9ffdba5 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs @@ -47,7 +47,6 @@ namespace System.Dynamic /// The binder provided by the call site. /// The result of the get operation. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TryGetMember(GetMemberBinder binder, out object? result) { result = null; @@ -82,7 +81,6 @@ namespace System.Dynamic /// The arguments to be used for the invocation. /// The result of the invocation. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TryInvokeMember(InvokeMemberBinder binder, object?[]? args, out object? result) { result = null; @@ -97,7 +95,6 @@ namespace System.Dynamic /// The binder provided by the call site. /// The result of the conversion. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TryConvert(ConvertBinder binder, out object? result) { result = null; @@ -113,7 +110,6 @@ namespace System.Dynamic /// The arguments used for creation. /// The created instance. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TryCreateInstance(CreateInstanceBinder binder, object?[]? args, [NotNullWhen(true)] out object? result) { result = null; @@ -129,7 +125,6 @@ namespace System.Dynamic /// The arguments to be used for the invocation. /// The result of the invocation. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TryInvoke(InvokeBinder binder, object?[]? args, out object? result) { result = null; @@ -145,7 +140,6 @@ namespace System.Dynamic /// The right operand for the operation. /// The result of the operation. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TryBinaryOperation(BinaryOperationBinder binder, object arg, out object? result) { result = null; @@ -160,7 +154,6 @@ namespace System.Dynamic /// The binder provided by the call site. /// The result of the operation. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TryUnaryOperation(UnaryOperationBinder binder, out object? result) { result = null; @@ -176,7 +169,6 @@ namespace System.Dynamic /// The indexes to be used. /// The result of the operation. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object? result) { result = null; @@ -192,7 +184,6 @@ namespace System.Dynamic /// The indexes to be used. /// The value to set. /// true if the operation is complete, false if the call site should determine behavior. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")] public virtual bool TrySetIndex(SetIndexBinder binder, object[] indexes, object? value) => false; /// @@ -209,7 +200,6 @@ namespace System.Dynamic /// Returns the enumeration of all dynamic member names. /// /// The list of dynamic member names. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] public virtual IEnumerable GetDynamicMemberNames() => Array.Empty(); #endregion diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/ExpandoObject.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/ExpandoObject.cs index c2ba210..5d1d74c 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/ExpandoObject.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/ExpandoObject.cs @@ -18,7 +18,6 @@ namespace System.Dynamic /// /// Represents an object with members that can be dynamically added and removed at runtime. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] public sealed class ExpandoObject : IDynamicMetaObjectProvider, IDictionary, INotifyPropertyChanged { private static readonly MethodInfo s_expandoTryGetValue = diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.cs index 60b5067..e6b2526 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.cs @@ -146,7 +146,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch1(CallSite site, T0 arg0) { site._match = false; @@ -292,7 +291,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch2(CallSite site, T0 arg0, T1 arg1) { site._match = false; @@ -438,7 +436,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch3(CallSite site, T0 arg0, T1 arg1, T2 arg2) { site._match = false; @@ -584,7 +581,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch4(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) { site._match = false; @@ -730,7 +726,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch5(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { site._match = false; @@ -876,7 +871,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch6(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { site._match = false; @@ -1022,7 +1016,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch7(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) { site._match = false; @@ -1168,7 +1161,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch8(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) { site._match = false; @@ -1314,7 +1306,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch9(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) { site._match = false; @@ -1460,7 +1451,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch10(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) { site._match = false; @@ -1605,7 +1595,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid1(CallSite site, T0 arg0) { site._match = false; @@ -1750,7 +1739,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid2(CallSite site, T0 arg0, T1 arg1) { site._match = false; @@ -1895,7 +1883,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid3(CallSite site, T0 arg0, T1 arg1, T2 arg2) { site._match = false; @@ -2040,7 +2027,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid4(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) { site._match = false; @@ -2185,7 +2171,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid5(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { site._match = false; @@ -2330,7 +2315,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid6(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { site._match = false; @@ -2475,7 +2459,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid7(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) { site._match = false; @@ -2620,7 +2603,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid8(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) { site._match = false; @@ -2765,7 +2747,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid9(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) { site._match = false; @@ -2910,7 +2891,6 @@ namespace System.Dynamic } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid10(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) { site._match = false; diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.tt b/src/libraries/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.tt index 7a1ab21..b4d8edc 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.tt +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/UpdateDelegates.Generated.tt @@ -160,7 +160,6 @@ for (int i = 1; i <= 10; i++) } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static TRet NoMatch<#=i#><<#=genericParameters#>>(<#=parameters#>) { site._match = false; @@ -316,7 +315,6 @@ for (int i = 1; i <= 10; i++) } [Obsolete("pregenerated CallSite.Update delegate", error: true)] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")] internal static void NoMatchVoid<#=i#><<#=genericParameters#>>(<#=parameters#>) { site._match = false; diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/TypeUtils.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/TypeUtils.cs index 97a14bf..a58784f 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/TypeUtils.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/TypeUtils.cs @@ -658,7 +658,6 @@ namespace System.Dynamic.Utils return null; } - [Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private static bool IsImplicitNumericConversion(Type source, Type destination) { TypeCode tcSource = source.GetTypeCode(); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/BinaryExpression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/BinaryExpression.cs index 1057bd0..f712158 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/BinaryExpression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/BinaryExpression.cs @@ -877,7 +877,6 @@ namespace System.Linq.Expressions /// A MethodInfo that specifies the implementing method. /// A LambdaExpression that represents a type conversion function. This parameter is used if binaryType is Coalesce or compound assignment. /// The BinaryExpression that results from calling the appropriate factory method. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static BinaryExpression MakeBinary(ExpressionType binaryType, Expression left, Expression right, bool liftToNull, MethodInfo? method, LambdaExpression? conversion) => binaryType switch { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/BoundConstants.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/BoundConstants.cs index 491f944..7ede725 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/BoundConstants.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/BoundConstants.cs @@ -43,7 +43,6 @@ namespace System.Linq.Expressions.Compiler { return object.ReferenceEquals(Value, other.Value) && Type.Equals(other.Type); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2231:OverloadOperatorEqualsOnOverridingValueTypeEquals")] public override bool Equals(object? obj) { return obj is TypedConstant typedConstant && Equals(typedConstant); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.Generated.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.Generated.cs index 300d659..64a955e 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.Generated.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.Generated.cs @@ -135,7 +135,6 @@ namespace System.Linq.Expressions.Compiler /// Creates a new delegate, or uses a func/action /// Note: this method does not cache /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] internal static Type MakeNewDelegate(Type[] types) { Debug.Assert(types != null && types.Length > 0); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs index dd26699..17b289b 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs @@ -323,7 +323,6 @@ namespace System.Linq.Expressions.Compiler il.Emit(fi.IsStatic ? OpCodes.Stsfld : OpCodes.Stfld, fi); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] internal static void EmitNew(this ILGenerator il, ConstructorInfo ci) { Debug.Assert(ci != null); @@ -696,7 +695,6 @@ namespace System.Linq.Expressions.Compiler } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private static void EmitNumericConversion(this ILGenerator il, Type typeFrom, Type typeTo, bool isChecked) { TypeCode tc = typeTo.GetTypeCode(); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Binary.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Binary.cs index faf3b02..4a329e5 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Binary.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Binary.cs @@ -145,7 +145,6 @@ namespace System.Linq.Expressions.Compiler } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private void EmitUnliftedBinaryOp(ExpressionType op, Type leftType, Type rightType) { Debug.Assert(!leftType.IsNullableType()); @@ -285,7 +284,6 @@ namespace System.Linq.Expressions.Compiler } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private void EmitLiftedBinaryOp(ExpressionType op, Type leftType, Type rightType, Type resultType, bool liftedToNull) { Debug.Assert(leftType.IsNullableType() || rightType.IsNullableType()); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.ControlFlow.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.ControlFlow.cs index 93f7737..29c078e 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.ControlFlow.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.ControlFlow.cs @@ -43,7 +43,6 @@ namespace System.Linq.Expressions.Compiler _labelBlock = new LabelScopeInfo(_labelBlock, type); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "kind")] private void PopLabelBlock(LabelScopeKind kind) { Debug.Assert(_labelBlock != null && _labelBlock.Kind == kind); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs index 14dec38..b0aa4e3 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs @@ -1109,7 +1109,6 @@ namespace System.Linq.Expressions.Compiler #region Expression helpers - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private void EmitLift(ExpressionType nodeType, Type resultType, MethodCallExpression mc, ParameterExpression[] paramList, Expression[] argList) { Debug.Assert(TypeUtils.AreEquivalent(resultType.GetNonNullableType(), mc.Type.GetNonNullableType())); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Generated.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Generated.cs index a95d886..b8ead30 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Generated.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Generated.cs @@ -11,7 +11,6 @@ namespace System.Linq.Expressions.Compiler { private readonly StackGuard _guard = new StackGuard(); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1505:AvoidUnmaintainableCode"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private void EmitExpression(Expression node, CompilationFlags flags) { // When compiling deep trees, we run the risk of triggering a terminating StackOverflowException, diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Logical.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Logical.cs index c1da9a9..59af316 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Logical.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Logical.cs @@ -454,7 +454,6 @@ namespace System.Linq.Expressions.Compiler /// constant folding over conditionals and logical expressions at the /// tree level. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] private void EmitExpressionAndBranch(bool branchValue, Expression node, Label label) { Debug.Assert(node.Type == typeof(bool)); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Unary.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Unary.cs index 1a29c7d..dce9fdd 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Unary.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Unary.cs @@ -118,7 +118,6 @@ namespace System.Linq.Expressions.Compiler } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private void EmitUnaryOperator(ExpressionType op, Type operandType, Type resultType) { bool operandIsNullable = operandType.IsNullableType(); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.cs index 35a70d7..f938538 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.cs @@ -24,7 +24,6 @@ namespace System.Linq.Expressions.Compiler /// contain multiple lambdas, the Compiler class is responsible for compiling the whole tree, individual /// lambdas are then compiled by the LambdaCompiler. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")] internal sealed partial class LambdaCompiler : ILocalCache { private static int s_lambdaMethodIndex; diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Generated.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Generated.cs index 5fb68ca..baf14e5 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Generated.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Generated.cs @@ -14,8 +14,6 @@ namespace System.Linq.Expressions.Compiler /// Expression to rewrite. /// State of the stack before the expression is emitted. /// Rewritten expression. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1505:AvoidUnmaintainableCode")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private Result RewriteExpression(Expression node, Stack stack) { if (node == null) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Temps.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Temps.cs index 1d58510..3514a19 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Temps.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Temps.cs @@ -54,7 +54,6 @@ namespace System.Linq.Expressions.Compiler /// to detect misuse of the and methods. /// [Conditional("DEBUG")] - [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] private void VerifyTemps() => _tm.VerifyTemps(); /// @@ -214,7 +213,6 @@ namespace System.Linq.Expressions.Compiler /// to detect misuse of the and methods. /// [Conditional("DEBUG")] - [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] internal void VerifyTemps() { Debug.Assert(_usedTemps == null || _usedTemps.Count == 0); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/DebugViewWriter.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/DebugViewWriter.cs index 428a17a..59c7e5f 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/DebugViewWriter.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/DebugViewWriter.cs @@ -11,7 +11,6 @@ using System.Reflection; namespace System.Linq.Expressions { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")] internal sealed class DebugViewWriter : ExpressionVisitor { [Flags] @@ -295,7 +294,6 @@ namespace System.Linq.Expressions Out(close.ToString(), Flow.Break); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] protected internal override Expression VisitBinary(BinaryExpression node) { if (node.NodeType == ExpressionType.ArrayIndex) @@ -576,7 +574,6 @@ namespace System.Linq.Expressions return node; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private static bool NeedsParentheses(Expression parent, Expression? child) { Debug.Assert(parent != null); @@ -655,7 +652,6 @@ namespace System.Linq.Expressions } // the greater the higher - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private static int GetOperatorPrecedence(Expression node) { // Roughly matches C# operator precedence, with some additional @@ -902,7 +898,6 @@ namespace System.Linq.Expressions return node; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] protected internal override Expression VisitUnary(UnaryExpression node) { switch (node.NodeType) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs index ef01a6c..91e6801 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Expression.cs @@ -16,7 +16,6 @@ namespace System.Linq.Expressions /// /// The base type for all nodes in Expression Trees. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")] public abstract partial class Expression { private static readonly CacheDict s_lambdaDelegateCache = new CacheDict(40); @@ -92,7 +91,6 @@ comparand: null /// /// The of the value represented by this . /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] public virtual Type Type { get diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ExpressionStringBuilder.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ExpressionStringBuilder.cs index 6abb20c..8f9e739 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ExpressionStringBuilder.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ExpressionStringBuilder.cs @@ -12,7 +12,6 @@ using System.Text; namespace System.Linq.Expressions { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")] internal sealed class ExpressionStringBuilder : ExpressionVisitor { private readonly StringBuilder _out; @@ -143,7 +142,6 @@ namespace System.Linq.Expressions Out(close); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] protected internal override Expression VisitBinary(BinaryExpression node) { if (node.NodeType == ExpressionType.ArrayIndex) @@ -611,7 +609,6 @@ namespace System.Linq.Expressions return node; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] protected internal override Expression VisitUnary(UnaryExpression node) { switch (node.NodeType) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ExpressionVisitor.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ExpressionVisitor.cs index a39518c..fa35b65 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ExpressionVisitor.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ExpressionVisitor.cs @@ -430,7 +430,6 @@ namespace System.Linq.Expressions /// The expression to visit. /// The modified expression, if it or any subexpression was modified; /// otherwise, returns the original expression. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] protected internal virtual Expression VisitNew(NewExpression node) { Expression[]? a = VisitArguments(node); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/AndInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/AndInstruction.cs index bad335e..a0c0743 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/AndInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/AndInstruction.cs @@ -172,7 +172,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static Instruction Create(Type type) => type.GetNonNullableType().GetTypeCode() switch { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/EqualInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/EqualInstruction.cs index d585b92..9ed50a4 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/EqualInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/EqualInstruction.cs @@ -508,7 +508,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static Instruction Create(Type type, bool liftedToNull) { if (liftedToNull) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/ExclusiveOrInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/ExclusiveOrInstruction.cs index af1ab58..cebe4a4 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/ExclusiveOrInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/ExclusiveOrInstruction.cs @@ -160,7 +160,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static Instruction Create(Type type) => type.GetNonNullableType().GetTypeCode() switch { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InstructionList.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InstructionList.cs index 1c8f1c4..5c1fa2c 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InstructionList.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InstructionList.cs @@ -13,7 +13,6 @@ using System.Dynamic.Utils; namespace System.Linq.Expressions.Interpreter { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")] [DebuggerTypeProxy(typeof(InstructionArray.DebugView))] internal readonly struct InstructionArray { @@ -66,7 +65,6 @@ namespace System.Linq.Expressions.Interpreter } [DebuggerTypeProxy(typeof(InstructionList.DebugView))] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")] internal sealed class InstructionList { private readonly List _instructions = new List(); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InterpretedFrame.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InterpretedFrame.cs index c8b45d1..ccd8860 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InterpretedFrame.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InterpretedFrame.cs @@ -11,23 +11,19 @@ namespace System.Linq.Expressions.Interpreter { internal sealed class InterpretedFrame { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] [ThreadStatic] private static InterpretedFrame? s_currentFrame; internal readonly Interpreter Interpreter; internal InterpretedFrame? _parent; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2105:ArrayFieldsShouldNotBeReadOnly")] private readonly int[]? _continuations; private int _continuationIndex; private int _pendingContinuation; private object? _pendingValue; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2105:ArrayFieldsShouldNotBeReadOnly")] public readonly object?[] Data; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2105:ArrayFieldsShouldNotBeReadOnly")] public readonly IStrongBox[]? Closure; public int StackIndex; diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LeftShiftInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LeftShiftInstruction.cs index f7db0e5..543d05e 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LeftShiftInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LeftShiftInstruction.cs @@ -160,7 +160,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static Instruction Create(Type type) => type.GetNonNullableType().GetTypeCode() switch { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs index 61520cc..a5c17bd 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LightCompiler.cs @@ -260,12 +260,10 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")] internal readonly struct InterpretedFrameInfo { private readonly string? _methodName; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] private readonly DebugInfo? _debugInfo; public InterpretedFrameInfo(string? methodName, DebugInfo? info) @@ -277,7 +275,6 @@ namespace System.Linq.Expressions.Interpreter public override string? ToString() => _debugInfo != null ? _methodName + ": " + _debugInfo : _methodName; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")] internal sealed class LightCompiler { private readonly InstructionList _instructions; @@ -1787,7 +1784,6 @@ namespace System.Linq.Expressions.Interpreter _labelBlock = new LabelScopeInfo(_labelBlock, type); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "kind")] private void PopLabelBlock(LabelScopeKind kind) { Debug.Assert(_labelBlock != null && _labelBlock.Kind == kind); @@ -3021,7 +3017,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private void CompileNoLabelPush(Expression expr) { // When compiling deep trees, we run the risk of triggering a terminating StackOverflowException, diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LocalAccess.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LocalAccess.cs index 5c9f4cf..b9c9b0d 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LocalAccess.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/LocalAccess.cs @@ -235,7 +235,6 @@ namespace System.Linq.Expressions.Interpreter #region Initialize - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1012:AbstractTypesShouldNotHaveConstructors")] internal abstract class InitializeLocalInstruction : LocalAccessInstruction { internal InitializeLocalInstruction(int index) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/NotEqualInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/NotEqualInstruction.cs index cae1cb2..edc87ba 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/NotEqualInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/NotEqualInstruction.cs @@ -490,7 +490,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static Instruction Create(Type type, bool liftedToNull) { if (liftedToNull) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/NumericConvertInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/NumericConvertInstruction.cs index 0a770f0..fe4e1e9 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/NumericConvertInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/NumericConvertInstruction.cs @@ -52,7 +52,6 @@ namespace System.Linq.Expressions.Interpreter public override string ToString() => InstructionName + "(" + _from + "->" + _to + ")"; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] internal sealed class Unchecked : NumericConvertInstruction { public override string InstructionName => "UncheckedConvert"; @@ -176,7 +175,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] internal sealed class Checked : NumericConvertInstruction { public override string InstructionName => "CheckedConvert"; diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/OrInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/OrInstruction.cs index a8b6cf0..aeab4a0 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/OrInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/OrInstruction.cs @@ -174,7 +174,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static Instruction Create(Type type) { return type.GetNonNullableType().GetTypeCode() switch diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/RightShiftInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/RightShiftInstruction.cs index 5d8bac5..6688ee1 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/RightShiftInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/RightShiftInstruction.cs @@ -160,7 +160,6 @@ namespace System.Linq.Expressions.Interpreter } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static Instruction Create(Type type) { return type.GetNonNullableType().GetTypeCode() switch diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/Utilities.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/Utilities.cs index e0a23d4..afe5061 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/Utilities.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/Utilities.cs @@ -16,8 +16,6 @@ namespace System.Linq.Expressions.Interpreter { private const int MaximumArity = 17; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")] internal static Type MakeDelegate(Type[] types) { Debug.Assert(types != null && types.Length > 0); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LabelTarget.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LabelTarget.cs index 267f101..1235fcc 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LabelTarget.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LabelTarget.cs @@ -27,7 +27,6 @@ namespace System.Linq.Expressions /// The type of value that is passed when jumping to the label /// (or System.Void if no value should be passed). /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] public Type Type { get; } /// diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/MemberExpression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/MemberExpression.cs index 7eb5785..eac4d4d 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/MemberExpression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/MemberExpression.cs @@ -125,7 +125,6 @@ namespace System.Linq.Expressions /// The containing object of the field. This can be null for static fields. /// The field to be accessed. /// The created . - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames")] public static MemberExpression Field(Expression? expression, FieldInfo field) { ContractUtils.RequiresNotNull(field, nameof(field)); @@ -175,7 +174,6 @@ namespace System.Linq.Expressions /// The containing the field. /// The field to be accessed. /// The created . - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames")] public static MemberExpression Field(Expression? expression, Type type, string fieldName) { ContractUtils.RequiresNotNull(type, nameof(type)); @@ -242,7 +240,6 @@ namespace System.Linq.Expressions /// The containing object of the property. This can be null for static properties. /// The property to be accessed. /// The created . - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames")] public static MemberExpression Property(Expression? expression, PropertyInfo property) { ContractUtils.RequiresNotNull(property, nameof(property)); diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/NewExpression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/NewExpression.cs index 9ea147e..5171d11 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/NewExpression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/NewExpression.cs @@ -200,7 +200,6 @@ namespace System.Linq.Expressions return new NewValueTypeExpression(type, EmptyReadOnlyCollection.Instance, null); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] private static void ValidateNewArgs(ConstructorInfo constructor, ref ReadOnlyCollection arguments, ref ReadOnlyCollection members) { ParameterInfo[] pis; diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/UnaryExpression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/UnaryExpression.cs index 7433603..80df9f2 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/UnaryExpression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/UnaryExpression.cs @@ -315,7 +315,6 @@ namespace System.Linq.Expressions /// The that results from calling the appropriate factory method. /// Thrown when does not correspond to a unary expression. /// Thrown when is null. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type, MethodInfo? method) => unaryType switch { diff --git a/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSite.cs b/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSite.cs index c90c5f5..7c0116a 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSite.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSite.cs @@ -142,7 +142,6 @@ namespace System.Runtime.CompilerServices /// /// The Level 0 cache - a delegate specialized based on the site history. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] public T Target = default!; /// @@ -172,7 +171,6 @@ namespace System.Runtime.CompilerServices { } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] internal CallSite CreateMatchMaker() { return new CallSite(); @@ -208,7 +206,6 @@ namespace System.Runtime.CompilerServices /// /// The binder responsible for the runtime binding of the dynamic operations at this call site. /// The new instance of dynamic call site. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")] public static CallSite Create(CallSiteBinder binder) { if (!typeof(T).IsSubclassOf(typeof(MulticastDelegate))) throw System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate(); @@ -393,7 +390,6 @@ namespace System.Runtime.CompilerServices } #endif - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] private T CreateCustomUpdateDelegate(MethodInfo invoke) { Type returnType = invoke.GetReturnType(); @@ -686,7 +682,6 @@ namespace System.Runtime.CompilerServices return lambda.Compile(); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")] private T CreateCustomNoMatchDelegate(MethodInfo invoke) { ParameterExpression[] @params = Array.ConvertAll(invoke.GetParametersCached(), p => Expression.Parameter(p.ParameterType, p.Name)); diff --git a/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSiteHelpers.cs b/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSiteHelpers.cs index 86449a9..68d051d 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSiteHelpers.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/CallSiteHelpers.cs @@ -23,7 +23,6 @@ namespace System.Runtime.CompilerServices /// True if the input is internally used by DLR and should not /// be displayed on the language code's stack. Otherwise, false. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] public static bool IsInternalFrame(MethodBase mb) { // All the dynamic methods created for DLR rules have a special name. diff --git a/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/Closure.cs b/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/Closure.cs index 0432f5c..9bd0069 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/Closure.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/Closure.cs @@ -17,15 +17,11 @@ namespace System.Runtime.CompilerServices /// /// Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2105:ArrayFieldsShouldNotBeReadOnly")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] public readonly object[] Constants; /// /// Represents the hoisted local variables from the parent context. /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2105:ArrayFieldsShouldNotBeReadOnly")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] public readonly object[]? Locals; /// diff --git a/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/ReadOnlyCollectionBuilder.cs b/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/ReadOnlyCollectionBuilder.cs index 5a588e9..645f961 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/ReadOnlyCollectionBuilder.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Runtime/CompilerServices/ReadOnlyCollectionBuilder.cs @@ -13,7 +13,6 @@ namespace System.Runtime.CompilerServices /// Builder for read only collections. /// /// The type of the collection element. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] public sealed class ReadOnlyCollectionBuilder : IList, IList { private const int DefaultCapacity = 4; diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpContentHeaders.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpContentHeaders.cs index 16b3f05..6bb0541 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpContentHeaders.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpContentHeaders.cs @@ -8,8 +8,6 @@ using System.Diagnostics.CodeAnalysis; namespace System.Net.Http.Headers { - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", - Justification = "This is not a collection")] public sealed class HttpContentHeaders : HttpHeaders { private readonly HttpContent _parent; @@ -111,8 +109,6 @@ namespace System.Net.Http.Headers set { SetOrRemoveParsedValue(KnownHeaders.ContentLocation.Descriptor, value); } } - [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", - Justification = "In this case the 'value' is the byte array. I.e. the array is treated as a value.")] public byte[] ContentMD5 { get { return (byte[])GetParsedValues(KnownHeaders.ContentMD5.Descriptor); } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs index 9ebd608..686b0cb 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs @@ -29,8 +29,6 @@ namespace System.Net.Http.Headers // object. E.g. the client receives a response with the following header: 'Via: 1.1 proxy, invalid' // - HttpHeaders.GetValues() will return "1.1 proxy", "invalid" // - HttpResponseHeaders.Via collection will only contain one ViaHeaderValue object with value "1.1 proxy" - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", - Justification = "This is not a collection")] public abstract class HttpHeaders : IEnumerable>> { private Dictionary _headerStore; diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpRequestHeaders.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpRequestHeaders.cs index cd564e8..47926dd 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpRequestHeaders.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpRequestHeaders.cs @@ -7,8 +7,6 @@ using System.Diagnostics.CodeAnalysis; namespace System.Net.Http.Headers { - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", - Justification = "This is not a collection")] public sealed class HttpRequestHeaders : HttpHeaders { private const int AcceptSlot = 0; @@ -40,7 +38,6 @@ namespace System.Net.Http.Headers public HttpHeaderValueCollection Accept => GetSpecializedCollection(AcceptSlot, thisRef => new HttpHeaderValueCollection(KnownHeaders.Accept.Descriptor, thisRef)); - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Charset", Justification = "The HTTP header name is 'Accept-Charset'.")] public HttpHeaderValueCollection AcceptCharset => GetSpecializedCollection(AcceptCharsetSlot, thisRef => new HttpHeaderValueCollection(KnownHeaders.AcceptCharset.Descriptor, thisRef)); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpResponseHeaders.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpResponseHeaders.cs index 4af2e89..c08b745 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpResponseHeaders.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpResponseHeaders.cs @@ -7,8 +7,6 @@ using System.Diagnostics.CodeAnalysis; namespace System.Net.Http.Headers { - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", - Justification = "This is not a collection")] public sealed class HttpResponseHeaders : HttpHeaders { private const int AcceptRangesSlot = 0; diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestException.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestException.cs index ea4efda..68662c0 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestException.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestException.cs @@ -7,7 +7,6 @@ using System.IO; namespace System.Net.Http { - [SuppressMessage("Microsoft.Serialization", "CA2229")] public class HttpRequestException : Exception { internal RequestRetryType AllowRetry { get; } = RequestRetryType.NoRetry; diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestMessage.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestMessage.cs index 0362146..ed2293a 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestMessage.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestMessage.cs @@ -136,8 +136,6 @@ namespace System.Net.Http if (NetEventSource.IsEnabled) NetEventSource.Exit(this); } - [SuppressMessage("Microsoft.Design", "CA1057:StringUriOverloadsCallSystemUriOverloads", - Justification = "It is OK to provide 'null' values. A Uri instance is created from 'requestUri' if it is != null.")] public HttpRequestMessage(HttpMethod method, string requestUri) { if (NetEventSource.IsEnabled) NetEventSource.Enter(this, method, requestUri); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/MultipartContent.cs b/src/libraries/System.Net.Http/src/System/Net/Http/MultipartContent.cs index 0f832a7..0930b59 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/MultipartContent.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/MultipartContent.cs @@ -13,9 +13,6 @@ using System.Threading.Tasks; namespace System.Net.Http { - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", - Justification = "Represents a multipart/* content. Even if a collection of HttpContent is stored, " + - "suffix Collection is not appropriate.")] public class MultipartContent : HttpContent, IEnumerable { #region Fields diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/MultipartFormDataContent.cs b/src/libraries/System.Net.Http/src/System/Net/Http/MultipartFormDataContent.cs index 6158bb9..dd88505 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/MultipartFormDataContent.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/MultipartFormDataContent.cs @@ -10,9 +10,6 @@ using System.Threading.Tasks; namespace System.Net.Http { - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", - Justification = "Represents a multipart/form-data content. Even if a collection of HttpContent is stored, " + - "suffix Collection is not appropriate.")] public class MultipartFormDataContent : MultipartContent { private const string formData = "form-data"; diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientException.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientException.cs index 2bb95d9..bad12ea 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientException.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientException.cs @@ -49,7 +49,6 @@ namespace System.Net.Mail } } - [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "System.dll is still using pre-v4 security model and needs this demand")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientsException.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientsException.cs index 96d7cda..e6a3b38 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientsException.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpFailedRecipientsException.cs @@ -68,7 +68,6 @@ namespace System.Net.Mail } } - [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "System.dll is still using pre-v4 security model and needs this demand")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Net.Requests/src/FxCopBaseline.cs b/src/libraries/System.Net.Requests/src/FxCopBaseline.cs deleted file mode 100644 index 555bfde..0000000 --- a/src/libraries/System.Net.Requests/src/FxCopBaseline.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("Microsoft.Design", "CA2237", Scope = "type", Target = "System.Net.FtpWebRequest")] -[assembly: SuppressMessage("Microsoft.Design", "CA2237", Scope = "type", Target = "System.Net.FtpWebResponse")] - -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FileWebRequest.#CheckAndMarkAsyncGetRequestStreamPending()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FileWebRequest.#CheckAndMarkAsyncGetResponsePending()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FileWebRequest.#CreateResponse():System.Net.WebResponse")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FileWebRequest.#UnblockReader()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.CommandStream.#Abort(System.Exception)")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.CommandStream.#ContinueCommandPipeline():System.IO.Stream")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FtpWebResponse.#get_Headers():System.Net.WebHeaderCollection")] diff --git a/src/libraries/System.Net.Requests/src/System.Net.Requests.csproj b/src/libraries/System.Net.Requests/src/System.Net.Requests.csproj index d63ccd8..fe4a6b1 100644 --- a/src/libraries/System.Net.Requests/src/System.Net.Requests.csproj +++ b/src/libraries/System.Net.Requests/src/System.Net.Requests.csproj @@ -6,9 +6,6 @@ $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix - - - diff --git a/src/libraries/System.Net.Requests/src/System/Net/FtpDataStream.cs b/src/libraries/System.Net.Requests/src/System/Net/FtpDataStream.cs index 64666bc..40c0486 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/FtpDataStream.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/FtpDataStream.cs @@ -58,7 +58,6 @@ namespace System.Net } //TODO: Add this to FxCopBaseline.cs once https://github.com/dotnet/roslyn/issues/15728 is fixed - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity")] void ICloseEx.CloseEx(CloseExState closeState) { if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"state = {closeState}"); diff --git a/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs b/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs index 115ee1e..a5df90b 100644 --- a/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs +++ b/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs @@ -85,8 +85,6 @@ namespace System.Net.WebSockets } } - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", - Justification = "This collection will be handed off directly to HttpWebRequest.")] public X509CertificateCollection ClientCertificates { get diff --git a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketCloseStatus.cs b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketCloseStatus.cs index 1e380c6..40511e1 100644 --- a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketCloseStatus.cs +++ b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketCloseStatus.cs @@ -6,10 +6,6 @@ using System.Diagnostics.CodeAnalysis; namespace System.Net.WebSockets { - [SuppressMessage("Microsoft.Design", - "CA1008:EnumsShouldHaveZeroValue", - Justification = "This enum is reflecting the IETF's WebSocket specification. " + - "'0' is a disallowed value for the close status code")] public enum WebSocketCloseStatus { NormalClosure = 1000, diff --git a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs index 7fe5265..5b18816 100644 --- a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs +++ b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs @@ -15,44 +15,32 @@ namespace System.Net.WebSockets { private readonly WebSocketError _webSocketErrorCode; - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException() : this(Marshal.GetLastWin32Error()) { } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(WebSocketError error) : this(error, GetErrorMessage(error)) { } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(WebSocketError error, string? message) : base(message) { _webSocketErrorCode = error; } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(WebSocketError error, Exception? innerException) : this(error, GetErrorMessage(error), innerException) { } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(WebSocketError error, string? message, Exception? innerException) : base(message, innerException) { _webSocketErrorCode = error; } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(int nativeError) : base(nativeError) { @@ -60,8 +48,6 @@ namespace System.Net.WebSockets SetErrorCodeOnError(nativeError); } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(int nativeError, string? message) : base(nativeError, message) { @@ -69,8 +55,6 @@ namespace System.Net.WebSockets SetErrorCodeOnError(nativeError); } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(int nativeError, Exception? innerException) : base(SR.net_WebSockets_Generic, innerException) { @@ -78,15 +62,11 @@ namespace System.Net.WebSockets SetErrorCodeOnError(nativeError); } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(WebSocketError error, int nativeError) : this(error, nativeError, GetErrorMessage(error)) { } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(WebSocketError error, int nativeError, string? message) : base(message) { @@ -94,15 +74,11 @@ namespace System.Net.WebSockets SetErrorCodeOnError(nativeError); } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(WebSocketError error, int nativeError, Exception? innerException) : this(error, nativeError, GetErrorMessage(error), innerException) { } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(WebSocketError error, int nativeError, string? message, Exception? innerException) : base(message, innerException) { @@ -110,15 +86,11 @@ namespace System.Net.WebSockets SetErrorCodeOnError(nativeError); } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(string? message) : base(message) { } - [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", - Justification = "This ctor is harmless, because it does not pass arbitrary data into the native code.")] public WebSocketException(string? message, Exception? innerException) : base(message, innerException) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.cs index 14755e5..fe102127 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.cs @@ -768,7 +768,6 @@ namespace System.Threading #if DEBUG private int executed; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1821:RemoveEmptyFinalizers")] ~QueueUserWorkItemCallbackBase() { Interlocked.MemoryBarrier(); // ensure that an old cached value is not read below diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlJsonWriter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlJsonWriter.cs index 5b2c29b..f19cd37 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlJsonWriter.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlJsonWriter.cs @@ -471,8 +471,6 @@ namespace System.Runtime.Serialization.Json throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteComment")); } - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "2#sysid", Justification = "This method is derived from the base")] - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "1#pubid", Justification = "This method is derived from the base")] public override void WriteDocType(string name, string pubid, string sysid, string subset) { throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteDocType")); @@ -773,7 +771,6 @@ namespace System.Runtime.Serialization.Json WriteString(new string(buffer, index, count)); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase")] // Microsoft, ToLowerInvariant is just used in Json error message public override void WriteStartAttribute(string prefix, string localName, string ns) { if (IsClosed) @@ -1136,7 +1133,6 @@ namespace System.Runtime.Serialization.Json } } - [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Whitespace", Justification = "This method is derived from the base")] public override void WriteWhitespace(string ws) { if (IsClosed) @@ -1327,7 +1323,6 @@ namespace System.Runtime.Serialization.Json } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase")] // Microsoft, ToLowerInvariant is just used in Json error message private void ThrowInvalidAttributeContent() { if (HasOpenAttribute) diff --git a/src/libraries/System.Private.Uri/src/FxCopBaseline.cs b/src/libraries/System.Private.Uri/src/FxCopBaseline.cs deleted file mode 100644 index dc2623d..0000000 --- a/src/libraries/System.Private.Uri/src/FxCopBaseline.cs +++ /dev/null @@ -1,8 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; - -// TODO: Remove this once https://github.com/dotnet/corefx/issues/13107 is fixed -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Uri.#CreateUriInfo(System.Uri+Flags)")] diff --git a/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj b/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj index 32f03ad..d211374 100644 --- a/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj +++ b/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj @@ -11,9 +11,6 @@ - - - diff --git a/src/libraries/System.Private.Uri/src/System/Uri.cs b/src/libraries/System.Private.Uri/src/System/Uri.cs index 91f2ec1..808cf4f 100644 --- a/src/libraries/System.Private.Uri/src/System/Uri.cs +++ b/src/libraries/System.Private.Uri/src/System/Uri.cs @@ -402,7 +402,6 @@ namespace System // ISerializable method // /// - [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "System.dll is still using pre-v4 security model and needs this demand")] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { GetObjectData(serializationInfo, streamingContext); diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XAttribute.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XAttribute.cs index 9adafce0..ec52cd2 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XAttribute.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XAttribute.cs @@ -16,7 +16,6 @@ namespace System.Xml.Linq /// /// An XML attribute is a name/value pair associated with an XML element. /// - [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "Reviewed.")] [System.ComponentModel.TypeDescriptionProvider("MS.Internal.Xml.Linq.ComponentModel.XTypeDescriptionProvider`1[[System.Xml.Linq.XAttribute, System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]],System.ComponentModel.TypeConverter")] public class XAttribute : XObject { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs index 8595997..b3b9cf5 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs @@ -184,7 +184,6 @@ namespace System.Xml.Linq /// An initialized with the contents of the file referenced /// in the passed in uri parameter. /// - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#", Justification = "Back-compat with System.Xml.")] public static XDocument Load(string uri) { return Load(uri, LoadOptions.None); @@ -213,7 +212,6 @@ namespace System.Xml.Linq /// in the passed uri parameter. If LoadOptions.PreserveWhitespace is enabled then /// all whitespace will be preserved. /// - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#", Justification = "Back-compat with System.Xml.")] public static XDocument Load(string uri, LoadOptions options) { XmlReaderSettings rs = GetXmlReaderSettings(options); diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XElement.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XElement.cs index 5ccbf7e..9d9445b 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XElement.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XElement.cs @@ -568,7 +568,6 @@ namespace System.Xml.Linq /// An initialized with the contents of the file referenced /// in the passed in uri parameter. /// - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", Justification = "Back-compat with System.Xml.")] public static XElement Load(string uri) { return Load(uri, LoadOptions.None); @@ -598,7 +597,6 @@ namespace System.Xml.Linq /// in the passed uri parameter. If LoadOptions.PreserveWhitespace is enabled then /// significant whitespace will be preserved. /// - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", Justification = "Back-compat with System.Xml.")] public static XElement Load(string uri, LoadOptions options) { XmlReaderSettings rs = GetXmlReaderSettings(options); @@ -1331,7 +1329,6 @@ namespace System.Xml.Linq /// The content of this as a . /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator string(XElement element) { if (element == null) return null; @@ -1354,7 +1351,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator bool(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1374,7 +1370,6 @@ namespace System.Xml.Linq /// Thrown if the element does not contain a valid boolean value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator bool?(XElement element) { if (element == null) return null; @@ -1397,7 +1392,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator int(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1417,7 +1411,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid integer value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator int?(XElement element) { if (element == null) return null; @@ -1440,7 +1433,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator uint(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1460,7 +1452,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid unsigned integer value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator uint?(XElement element) { if (element == null) return null; @@ -1483,7 +1474,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator long(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1503,7 +1493,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid long integer value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator long?(XElement element) { if (element == null) return null; @@ -1526,7 +1515,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator ulong(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1546,7 +1534,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid unsigned long integer value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator ulong?(XElement element) { if (element == null) return null; @@ -1569,7 +1556,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator float(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1589,7 +1575,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid float value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator float?(XElement element) { if (element == null) return null; @@ -1612,7 +1597,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator double(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1632,7 +1616,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid double value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator double?(XElement element) { if (element == null) return null; @@ -1655,7 +1638,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator decimal(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1675,7 +1657,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid decimal value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator decimal?(XElement element) { if (element == null) return null; @@ -1698,7 +1679,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator DateTime(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1718,7 +1698,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator DateTime?(XElement element) { if (element == null) return null; @@ -1741,7 +1720,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator DateTimeOffset(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1761,7 +1739,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator DateTimeOffset?(XElement element) { if (element == null) return null; @@ -1784,7 +1761,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator TimeSpan(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1804,7 +1780,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid value. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator TimeSpan?(XElement element) { if (element == null) return null; @@ -1827,7 +1802,6 @@ namespace System.Xml.Linq /// Thrown if the specified element is null. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator Guid(XElement element) { if (element == null) throw new ArgumentNullException(nameof(element)); @@ -1847,7 +1821,6 @@ namespace System.Xml.Linq /// Thrown if the specified element does not contain a valid guid. /// [CLSCompliant(false)] - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Operator marked with CLSCompliant(false).")] public static explicit operator Guid?(XElement element) { if (element == null) return null; diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XLinq.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XLinq.cs index 46f7068..e2a4a4f 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XLinq.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XLinq.cs @@ -690,7 +690,6 @@ namespace System.Xml.Linq None = 0x00000000, /// Preserve whitespace. - [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", Justification = "Back-compat with System.Xml.")] PreserveWhitespace = 0x00000001, /// Set the BaseUri property. diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XName.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XName.cs index e9d9972..562916d 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XName.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XName.cs @@ -10,7 +10,6 @@ namespace System.Xml.Linq /// /// Represents a name of an XML element or attribute. This class cannot be inherited. /// - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Serialization", "CA2229", Justification = "Serialized with custom proxy")] public sealed class XName : IEquatable, ISerializable { private readonly XNamespace _ns; diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNamespace.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNamespace.cs index aa14505..2f6ec49 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNamespace.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNamespace.cs @@ -135,7 +135,6 @@ namespace System.Xml.Linq /// The namespace for the expanded name. /// The local name for the expanded name. /// The new XName constructed from the namespace and local name. - [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Functionality available via XNamespace.Get().")] public static XName operator +(XNamespace ns, string localName) { if (ns == null) throw new ArgumentNullException(nameof(ns)); diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNode.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNode.cs index ac8e213..9a54bdc 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNode.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNode.cs @@ -235,7 +235,6 @@ namespace System.Xml.Linq /// /// Thrown if the two nodes do not share a common ancestor. /// - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Reviewed.")] public static int CompareDocumentOrder(XNode n1, XNode n2) { if (n1 == n2) return 0; @@ -613,7 +612,6 @@ namespace System.Xml.Linq /// Two nodes are equal if they have the same /// target and data. Two nodes are equal if the have the /// same name, public id, system id, and internal subset. - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Reviewed.")] public static bool DeepEquals(XNode n1, XNode n2) { if (n1 == n2) return true; diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XObject.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XObject.cs index 0e8e7d3..15dd754 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XObject.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XObject.cs @@ -22,7 +22,6 @@ namespace System.Xml.Linq /// /// Get the BaseUri for this . /// - [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = "Back-compat with System.Xml.")] public string BaseUri { get diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XObjectChangeEventArgs.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XObjectChangeEventArgs.cs index cd68bba..bdd9d4e 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XObjectChangeEventArgs.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XObjectChangeEventArgs.cs @@ -16,25 +16,21 @@ namespace System.Xml.Linq /// /// Event argument for a change event. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Justification = "XObjectChangeEventArgs is in fact immutable.")] public static readonly XObjectChangeEventArgs Add = new XObjectChangeEventArgs(XObjectChange.Add); /// /// Event argument for a change event. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Justification = "XObjectChangeEventArgs is in fact immutable.")] public static readonly XObjectChangeEventArgs Remove = new XObjectChangeEventArgs(XObjectChange.Remove); /// /// Event argument for a change event. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Justification = "XObjectChangeEventArgs is in fact immutable.")] public static readonly XObjectChangeEventArgs Name = new XObjectChangeEventArgs(XObjectChange.Name); /// /// Event argument for a change event. /// - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Justification = "XObjectChangeEventArgs is in fact immutable.")] public static readonly XObjectChangeEventArgs Value = new XObjectChangeEventArgs(XObjectChange.Value); /// diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs index 6b39b8a..a4ded03 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs @@ -433,7 +433,6 @@ namespace System.Xml.Schema /// Gets the schema information that has been assigned to the as a result of schema validation. /// /// Extension point - [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "Reviewed by the design group.")] public static IXmlSchemaInfo GetSchemaInfo(this XElement source) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -444,7 +443,6 @@ namespace System.Xml.Schema /// Gets the schema information that has been assigned to the as a result of schema validation. /// /// Extension point - [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "Reviewed by the design group.")] public static IXmlSchemaInfo GetSchemaInfo(this XAttribute source) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -475,7 +473,6 @@ namespace System.Xml.Schema /// If enabled the and the corresponding /// subtree is augmented with PSVI in the form of annotations, /// default attributes and default element values - [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "Reviewed by the design group.")] public static void Validate(this XDocument source, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -513,7 +510,6 @@ namespace System.Xml.Schema /// If enabled the and the corresponding /// subtree is augmented with PSVI in the form of annotations, /// default attributes and default element values - [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "Reviewed by the design group.")] public static void Validate(this XElement source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -552,7 +548,6 @@ namespace System.Xml.Schema /// If enabled the is augmented with PSVI /// in the form of annotations, default attributes and /// default element values - [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "Reviewed by the design group.")] public static void Validate(this XAttribute source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo) { if (source == null) throw new ArgumentNullException(nameof(source)); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs index 696e43e..6890850 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs @@ -423,7 +423,6 @@ namespace System.Xml.Serialization } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2106:SecureAsserts", Justification = "It is safe because the serialization assembly is generated by the framework code, not by the user.")] internal static Assembly GenerateRefEmitAssembly(XmlMapping[] xmlMappings, Type[] types, string defaultNamespace) { var scopeTable = new Dictionary(); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs index bea1ab0..f9d6bdd 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs @@ -24,7 +24,6 @@ namespace System.Xml.Serialization private static DateTimeSerializationSection.DateTimeSerializationMode Mode { - [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "Reviewed for thread-safety")] get { if (s_mode == DateTimeSerializationSection.DateTimeSerializationMode.Default) diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XslCompiledTransform.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XslCompiledTransform.cs index d378f11..c67af0d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XslCompiledTransform.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xslt/XslCompiledTransform.cs @@ -355,7 +355,6 @@ namespace System.Xml.Xsl // suppress the message. //------------------------------------------------ - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void Transform(string inputUri, XmlWriter results) { CheckArguments(inputUri, results); @@ -365,7 +364,6 @@ namespace System.Xml.Xsl } } - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void Transform(string inputUri, XsltArgumentList arguments, XmlWriter results) { CheckArguments(inputUri, results); @@ -375,7 +373,6 @@ namespace System.Xml.Xsl } } - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void Transform(string inputUri, XsltArgumentList arguments, TextWriter results) { CheckArguments(inputUri, results); @@ -387,7 +384,6 @@ namespace System.Xml.Xsl } } - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void Transform(string inputUri, XsltArgumentList arguments, Stream results) { CheckArguments(inputUri, results); @@ -399,7 +395,6 @@ namespace System.Xml.Xsl } } - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")] public void Transform(string inputUri, string resultsFile) { if (inputUri == null) diff --git a/src/libraries/System.Reflection.Context/tests/Properties/Resources.Designer.cs b/src/libraries/System.Reflection.Context/tests/Properties/Resources.Designer.cs index 8f6d672..cadfcf9 100644 --- a/src/libraries/System.Reflection.Context/tests/Properties/Resources.Designer.cs +++ b/src/libraries/System.Reflection.Context/tests/Properties/Resources.Designer.cs @@ -29,7 +29,6 @@ namespace Properties { private static global::System.Globalization.CultureInfo resourceCulture; - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } diff --git a/src/libraries/System.Resources.ResourceManager/tests/Resources/TestResx.Designer.cs b/src/libraries/System.Resources.ResourceManager/tests/Resources/TestResx.Designer.cs index ef89f49..ea4cfbf 100644 --- a/src/libraries/System.Resources.ResourceManager/tests/Resources/TestResx.Designer.cs +++ b/src/libraries/System.Resources.ResourceManager/tests/Resources/TestResx.Designer.cs @@ -29,7 +29,6 @@ namespace System.Resources.Tests.Resources { private static global::System.Globalization.CultureInfo resourceCulture; - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TestResx() { } diff --git a/src/libraries/System.Resources.ResourceManager/tests/Resources/TestResx.netstandard17.Designer.cs b/src/libraries/System.Resources.ResourceManager/tests/Resources/TestResx.netstandard17.Designer.cs index 8cef5ec..5cce262 100644 --- a/src/libraries/System.Resources.ResourceManager/tests/Resources/TestResx.netstandard17.Designer.cs +++ b/src/libraries/System.Resources.ResourceManager/tests/Resources/TestResx.netstandard17.Designer.cs @@ -28,7 +28,6 @@ namespace System.Resources.Tests.Resources { private static global::System.Globalization.CultureInfo resourceCulture; - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TestResx_netstandard17() { } diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheExpires.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheExpires.cs index 0fa9630..902862d 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheExpires.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheExpires.cs @@ -83,7 +83,6 @@ namespace System.Runtime.Caching } } - [SuppressMessage("Microsoft.Portability", "CA1900:ValueTypeFieldsShouldBePortable", Justification = "Grandfathered suppression from original caching code checkin")] [StructLayout(LayoutKind.Explicit)] internal struct ExpiresEntry { @@ -619,7 +618,6 @@ namespace System.Runtime.Caching } } - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Grandfathered suppression from original caching code checkin")] internal void UtcUpdateCacheEntry(MemoryCacheEntry cacheEntry, DateTime utcExpires) { lock (this) @@ -953,7 +951,6 @@ namespace System.Runtime.Caching } } - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Grandfathered suppression from original caching code checkin")] internal void UtcUpdate(MemoryCacheEntry cacheEntry, DateTime utcNewExpires) { int oldBucket = cacheEntry.ExpiresBucket; diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheUsage.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheUsage.cs index a4abc08..632d9f9 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheUsage.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheUsage.cs @@ -116,7 +116,6 @@ namespace System.Runtime.Caching internal UsageEntryRef _prev; } - [SuppressMessage("Microsoft.Portability", "CA1900:ValueTypeFieldsShouldBePortable", Justification = "Grandfathered suppression from original caching code checkin")] [StructLayout(LayoutKind.Explicit)] internal struct UsageEntry { @@ -901,7 +900,6 @@ namespace System.Runtime.Caching } } - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Grandfathered suppression from original caching code checkin")] internal void Update(MemoryCacheEntry cacheEntry) { byte bucket = cacheEntry.UsageBucket; diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ChangeMonitor.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ChangeMonitor.cs index 0c56764..822eba0 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ChangeMonitor.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ChangeMonitor.cs @@ -92,7 +92,6 @@ namespace System.Runtime.Caching // The helper routines (OnChangedHelper and DisposeHelper) are used to prevent // an infinite loop, where Dispose calls OnChanged and OnChanged calls Dispose. - [SuppressMessage("Microsoft.Performance", "CA1816:DisposeMethodsShouldCallSuppressFinalize", Justification = "Grandfathered suppression from original caching code checkin")] private void DisposeHelper() { // if not initialized, return without doing anything. @@ -202,7 +201,6 @@ namespace System.Runtime.Caching // Dispose() will only invoke the Dispose(bool disposing) method of derived classes // once, the first time it is called. Subsequent calls to Dispose() perform no // operation. After Dispose is called, the IsDisposed property will be true. - [SuppressMessage("Microsoft.Performance", "CA1816:DisposeMethodsShouldCallSuppressFinalize", Justification = "Grandfathered suppression from original caching code checkin")] public void Dispose() { OnChangedHelper(null); diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs index 3755965..3dcbf43 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs @@ -17,7 +17,6 @@ using System.Diagnostics; namespace System.Runtime.Caching { - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "The class represents a type of cache")] public class MemoryCache : ObjectCache, IEnumerable, IDisposable { private const DefaultCacheCapabilities CAPABILITIES = DefaultCacheCapabilities.InMemoryProvider @@ -868,7 +867,6 @@ namespace System.Runtime.Caching // used when redirecting ASP.NET cache into the MemoryCache. This avoids infinite recursion // due to the fact that the (ASP.NET) config system uses the cache, and the cache uses the // config system. - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Grandfathered suppression from original caching code checkin")] internal void UpdateConfig(NameValueCollection config) { if (config == null) diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheEntry.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheEntry.cs index 5f87a4d..4047cc6 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheEntry.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheEntry.cs @@ -98,7 +98,6 @@ namespace System.Runtime.Caching set { _usageEntryRef = value; } } - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Grandfathered suppression from original caching code checkin")] internal DateTime UtcLastUpdateUsage { get { return _utcLastUpdateUsage; } diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStatistics.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStatistics.cs index 16d7fc8..b16fce3 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStatistics.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStatistics.cs @@ -333,7 +333,6 @@ namespace System.Runtime.Caching } } - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Grandfathered suppression from original caching code checkin")] internal void UpdateConfig(NameValueCollection config) { int pollingInterval = ConfigUtil.GetIntValueFromTimeSpan(config, ConfigUtil.PollingInterval, _configPollingInterval); diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ObjectCache.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ObjectCache.cs index 793ee65..834a1eb 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ObjectCache.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ObjectCache.cs @@ -14,7 +14,6 @@ using System.Threading; namespace System.Runtime.Caching { - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "The class represents a type of cache")] public abstract class ObjectCache : IEnumerable> { private static IServiceProvider s_host; @@ -87,18 +86,14 @@ namespace System.Runtime.Caching public abstract object AddOrGetExisting(string key, object value, CacheItemPolicy policy, string regionName = null); - [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", Justification = "The name best represents an operation on a cache")] public abstract object Get(string key, string regionName = null); public abstract CacheItem GetCacheItem(string key, string regionName = null); - [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", Justification = "The name best represents an operation on a cache")] public abstract void Set(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null); - [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", Justification = "The name best represents an operation on a cache")] public abstract void Set(CacheItem item, CacheItemPolicy policy); - [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", Justification = "The name best represents an operation on a cache")] public abstract void Set(string key, object value, CacheItemPolicy policy, string regionName = null); //Get multiple items by keys diff --git a/src/libraries/System.Runtime.Extensions/src/System/Net/WebUtility.cs b/src/libraries/System.Runtime.Extensions/src/System/Net/WebUtility.cs index d09b4ff..e2d1e18 100644 --- a/src/libraries/System.Runtime.Extensions/src/System/Net/WebUtility.cs +++ b/src/libraries/System.Runtime.Extensions/src/System/Net/WebUtility.cs @@ -404,7 +404,6 @@ namespace System.Net #region UrlEncode public methods - [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", Justification = "Already shipped public API; code moved here as part of API consolidation")] [return: NotNullIfNotNull("value")] public static string? UrlEncode(string? value) { @@ -608,7 +607,6 @@ namespace System.Net #region UrlDecode public methods - [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", Justification = "Already shipped public API; code moved here as part of API consolidation")] [return: NotNullIfNotNull("encodedValue")] public static string? UrlDecode(string? encodedValue) { diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Complex.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Complex.cs index e5e0d63..aecfdb9 100644 --- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/Complex.cs +++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/Complex.cs @@ -424,7 +424,6 @@ namespace System.Numerics // instead produces (PositiveInfinity, PositiveInfinity). } - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Sinh", Justification = "Sinh is the name of a mathematical function.")] public static Complex Sinh(Complex value) { // Use sinh(z) = -i sin(iz) to compute via sin(z). @@ -462,7 +461,6 @@ namespace System.Numerics return new Complex(Math.Cos(value.m_real) * cosh, -Math.Sin(value.m_real) * sinh); } - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Cosh", Justification = "Cosh is the name of a mathematical function.")] public static Complex Cosh(Complex value) { // Use cosh(z) = cos(iz) to compute via cos(z). @@ -519,7 +517,6 @@ namespace System.Numerics } } - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Tanh", Justification = "Tanh is the name of a mathematical function.")] public static Complex Tanh(Complex value) { // Use tanh(z) = -i tan(iz) to compute via tan(z). @@ -681,7 +678,6 @@ namespace System.Numerics return new Complex(cosImaginary, sinImaginary); } - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Sqrt", Justification = "Sqrt is the name of a mathematical function.")] public static Complex Sqrt(Complex value) { diff --git a/src/libraries/System.Runtime/src/System/Action.cs b/src/libraries/System.Runtime/src/System/Action.cs index c7b1787..84f60a0 100644 --- a/src/libraries/System.Runtime/src/System/Action.cs +++ b/src/libraries/System.Runtime/src/System/Action.cs @@ -4,27 +4,19 @@ namespace System { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16); } diff --git a/src/libraries/System.Runtime/src/System/Function.cs b/src/libraries/System.Runtime/src/System/Function.cs index 224d16d..43f647e 100644 --- a/src/libraries/System.Runtime/src/System/Function.cs +++ b/src/libraries/System.Runtime/src/System/Function.cs @@ -4,27 +4,19 @@ namespace System { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16); } diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/AppleCertificatePal.cs b/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/AppleCertificatePal.cs index acefe67..828384a 100644 --- a/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/AppleCertificatePal.cs +++ b/src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/AppleCertificatePal.cs @@ -345,8 +345,7 @@ namespace Internal.Cryptography.Pal } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA5350", - Justification = "SHA1 is required for Compat")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA5350", Justification = "SHA1 is required for Compat")] public byte[] Thumbprint { get diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs b/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs index fede91c..c5f70eb 100644 --- a/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs +++ b/src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs @@ -163,7 +163,6 @@ namespace System.Security.Cryptography.X509Certificates } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Public API has already shipped.")] public X509Certificate(SerializationInfo info, StreamingContext context) : this() { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs index 42e5617..be5c623 100644 --- a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs +++ b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs @@ -300,7 +300,6 @@ namespace System.Security.Principal _safeTokenHandle = DuplicateAccessToken(userToken); } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Public API has already shipped.")] public WindowsIdentity(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(); diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10FeedFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10FeedFormatter.cs index 9cc2777..9e5feb9 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10FeedFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10FeedFormatter.cs @@ -81,10 +81,8 @@ namespace System.ServiceModel.Syndication return reader.IsStartElement(Atom10Constants.FeedTag, Atom10Constants.Atom10Namespace); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] XmlSchema IXmlSerializable.GetSchema() => null; - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.ReadXml(XmlReader reader) { if (reader == null) @@ -95,7 +93,6 @@ namespace System.ServiceModel.Syndication ReadFeed(reader); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.WriteXml(XmlWriter writer) { if (writer == null) @@ -513,7 +510,6 @@ namespace System.ServiceModel.Syndication return item; } - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "The out parameter is needed to enable implementations that read in items from the stream on demand")] protected virtual IEnumerable ReadItems(XmlReader reader, SyndicationFeed feed, out bool areAllItemsRead) { if (feed == null) diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10ItemFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10ItemFormatter.cs index 63417f0..5a735ac 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10ItemFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10ItemFormatter.cs @@ -73,10 +73,8 @@ namespace System.ServiceModel.Syndication return reader.IsStartElement(Atom10Constants.EntryTag, Atom10Constants.Atom10Namespace); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] XmlSchema IXmlSerializable.GetSchema() => null; - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.ReadXml(XmlReader reader) { if (reader == null) @@ -87,7 +85,6 @@ namespace System.ServiceModel.Syndication ReadItem(reader); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.WriteXml(XmlWriter writer) { if (writer == null) diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10CategoriesDocumentFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10CategoriesDocumentFormatter.cs index 152d9a0..7d4cffd 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10CategoriesDocumentFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10CategoriesDocumentFormatter.cs @@ -71,10 +71,8 @@ namespace System.ServiceModel.Syndication return reader.IsStartElement(App10Constants.Categories, App10Constants.Namespace); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] XmlSchema IXmlSerializable.GetSchema() => null; - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.ReadXml(XmlReader reader) { if (reader == null) @@ -85,7 +83,6 @@ namespace System.ServiceModel.Syndication ReadDocument(reader); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.WriteXml(XmlWriter writer) { if (writer == null) diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10ServiceDocumentFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10ServiceDocumentFormatter.cs index b3bb4e5..b08193e 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10ServiceDocumentFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10ServiceDocumentFormatter.cs @@ -56,10 +56,8 @@ namespace System.ServiceModel.Syndication return reader.IsStartElement(App10Constants.Service, App10Constants.Namespace); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] XmlSchema IXmlSerializable.GetSchema() => null; - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.ReadXml(XmlReader reader) { if (reader == null) @@ -70,7 +68,6 @@ namespace System.ServiceModel.Syndication ReadDocument(reader); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.WriteXml(XmlWriter writer) { if (writer == null) diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20FeedFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20FeedFormatter.cs index c27166b..3ff0f52 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20FeedFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20FeedFormatter.cs @@ -83,10 +83,8 @@ namespace System.ServiceModel.Syndication return reader.IsStartElement(Rss20Constants.RssTag, Rss20Constants.Rss20Namespace); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] XmlSchema IXmlSerializable.GetSchema() => null; - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.ReadXml(XmlReader reader) { if (reader == null) @@ -97,7 +95,6 @@ namespace System.ServiceModel.Syndication ReadFeed(reader); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.WriteXml(XmlWriter writer) { if (writer == null) @@ -164,7 +161,6 @@ namespace System.ServiceModel.Syndication return item; } - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "The out parameter is needed to enable implementations that read in items from the stream on demand")] protected virtual IEnumerable ReadItems(XmlReader reader, SyndicationFeed feed, out bool areAllItemsRead) { if (feed == null) diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20ItemFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20ItemFormatter.cs index 7408671..2f2a76b 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20ItemFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20ItemFormatter.cs @@ -96,10 +96,8 @@ namespace System.ServiceModel.Syndication return reader.IsStartElement(Rss20Constants.ItemTag, Rss20Constants.Rss20Namespace); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] XmlSchema IXmlSerializable.GetSchema() => null; - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.ReadXml(XmlReader reader) { if (reader == null) @@ -110,7 +108,6 @@ namespace System.ServiceModel.Syndication ReadItem(reader); } - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "The IXmlSerializable implementation is only for exposing under WCF DataContractSerializer. The funcionality is exposed to derived class through the ReadFrom\\WriteTo methods")] void IXmlSerializable.WriteXml(XmlWriter writer) { if (writer == null) diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItem.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItem.cs index e860683..d1f8a1d 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItem.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItem.cs @@ -180,8 +180,6 @@ namespace System.ServiceModel.Syndication } - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "0#permalink", Justification = "permalink is a term defined in the RSS format")] - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Permalink", Justification = "permalink is a term defined in the RSS format")] public void AddPermalink(Uri permalink) { if (permalink == null) diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationPerson.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationPerson.cs index 53b37f1..49b5f34 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationPerson.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationPerson.cs @@ -21,7 +21,6 @@ namespace System.ServiceModel.Syndication { } - [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#", Justification = "The Uri represents a unique category and not a network location")] public SyndicationPerson(string email, string name, string uri) { Name = name; @@ -50,7 +49,6 @@ namespace System.ServiceModel.Syndication public string Name { get; set; } - [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Scope = "property", Justification = "The Uri represents a unique category and not a network location")] public string Uri { get; set; } public virtual SyndicationPerson Clone() => new SyndicationPerson(this); diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs index c41568d..73dd608 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs @@ -190,7 +190,6 @@ namespace System.Threading.Tasks.Dataflow IDisposable ISourceBlock.LinkTo(ITargetBlock target, DataflowLinkOptions linkOptions) { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -291,7 +290,6 @@ namespace System.Threading.Tasks.Dataflow /// /// /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] public static Task SendAsync(this ITargetBlock target, TInput item, CancellationToken cancellationToken) { // Validate arguments. No validation necessary for item. @@ -495,7 +493,6 @@ namespace System.Threading.Tasks.Dataflow /// the target is calling to ConsumeMessage. We don't want to block the target indefinitely /// with any synchronous continuations off of the returned send async task. /// - [SuppressMessage("Microsoft.Usage", "CA1816:CallGCSuppressFinalizeCorrectly")] private void RunCompletionAction(Action completionAction, object completionActionState, bool runAsync) { Debug.Assert(completionAction != null, "Completion action to run is required."); @@ -563,7 +560,6 @@ namespace System.Threading.Tasks.Dataflow } /// Offers the message to the target synchronously. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] internal void OfferToTarget() { try @@ -724,7 +720,6 @@ namespace System.Threading.Tasks.Dataflow void IDataflowBlock.Fault(Exception exception) { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -934,7 +929,6 @@ namespace System.Threading.Tasks.Dataflow /// /// If the source successfully offered an item that was received by this operation, it will be returned, even if a concurrent timeout or cancellation request occurs. /// - [SuppressMessage("Microsoft.Usage", "CA2200:RethrowToPreserveStackDetails")] public static TOutput Receive( this ISourceBlock source, TimeSpan timeout, CancellationToken cancellationToken) { @@ -981,7 +975,6 @@ namespace System.Threading.Tasks.Dataflow /// A that represents the number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely. /// The which may be used to cancel the receive operation. /// A Task for the receive operation. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private static Task ReceiveCore( this ISourceBlock source, bool attemptTryReceive, TimeSpan timeout, CancellationToken cancellationToken) { @@ -1048,7 +1041,6 @@ namespace System.Threading.Tasks.Dataflow /// The source from which to receive. /// The number of milliseconds to wait, or -1 to wait indefinitely. /// The which may be used to cancel the receive operation. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private static Task ReceiveCoreByLinking(ISourceBlock source, int millisecondsTimeout, CancellationToken cancellationToken) { // Create a target to link from the source @@ -1114,7 +1106,6 @@ namespace System.Threading.Tasks.Dataflow /// Provides a TaskCompletionSource that is also a dataflow target for use in ReceiveCore. /// Specifies the type of data offered to the target. - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] [DebuggerDisplay("{DebuggerDisplayContent,nq}")] private sealed class ReceiveTarget : TaskCompletionSource, ITargetBlock, IDebuggerDisplay { @@ -1159,7 +1150,6 @@ namespace System.Threading.Tasks.Dataflow internal ReceiveTarget() { } /// Offers a message to be used to complete the TaskCompletionSource. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] DataflowMessageStatus ITargetBlock.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock source, bool consumeToAccept) { // Validate arguments @@ -1239,8 +1229,6 @@ namespace System.Threading.Tasks.Dataflow /// Cleans up the target for completion. /// The reason we're completing and cleaning up. /// This method must only be called once on this instance. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] - [SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes")] private void CleanupAndComplete(ReceiveCoreByLinkingCleanupReason reason) { Common.ContractAssertMonitorStatus(IncomingLock, held: false); @@ -1376,7 +1364,6 @@ namespace System.Threading.Tasks.Dataflow Task IDataflowBlock.Completion { get { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -1424,9 +1411,6 @@ namespace System.Threading.Tasks.Dataflow /// If it returns false, more output is not and will never be available, due to the source /// completing prior to output being available. /// - [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] - [SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")] public static Task OutputAvailableAsync( this ISourceBlock source, CancellationToken cancellationToken) { @@ -1574,7 +1558,6 @@ namespace System.Threading.Tasks.Dataflow Task IDataflowBlock.Completion { get { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -1695,7 +1678,6 @@ namespace System.Threading.Tasks.Dataflow } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -1798,7 +1780,6 @@ namespace System.Threading.Tasks.Dataflow /// The is null (Nothing in Visual Basic). /// The is null (Nothing in Visual Basic). /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")] public static Task Choose( ISourceBlock source1, Action action1, ISourceBlock source2, Action action2, @@ -1889,7 +1870,6 @@ namespace System.Threading.Tasks.Dataflow /// The is null (Nothing in Visual Basic). /// The is null (Nothing in Visual Basic). /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")] public static Task Choose( ISourceBlock source1, Action action1, ISourceBlock source2, Action action2, @@ -1922,8 +1902,6 @@ namespace System.Threading.Tasks.Dataflow /// The third source. /// The handler to execute on data from the third source. /// The options with which to configure this choice. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] - [SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")] private static Task ChooseCore( ISourceBlock source1, Action action1, ISourceBlock source2, Action action2, @@ -2009,8 +1987,6 @@ namespace System.Threading.Tasks.Dataflow /// The third source. /// The handler to execute on data from the third source. /// The options with which to configure this choice. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] - [SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")] private static Task ChooseCoreByLinking( ISourceBlock source1, Action action1, ISourceBlock source2, Action action2, @@ -2106,7 +2082,6 @@ namespace System.Threading.Tasks.Dataflow /// The source with which this branch is associated. /// The action to run for a single element received from the source. /// A task representing the branch. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private static Task CreateChooseBranch( StrongBox boxedCompleted, CancellationTokenSource cts, TaskScheduler scheduler, @@ -2246,7 +2221,6 @@ namespace System.Threading.Tasks.Dataflow Task IDataflowBlock.Completion { get { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -2331,7 +2305,6 @@ namespace System.Threading.Tasks.Dataflow /// Subscribes the observer to the source. /// the observer to subscribe. /// An IDisposable that may be used to unsubscribe the source. - [SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")] IDisposable IObservable.Subscribe(IObserver observer) { // Validate arguments @@ -2432,7 +2405,6 @@ namespace System.Threading.Tasks.Dataflow } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -2466,7 +2438,6 @@ namespace System.Threading.Tasks.Dataflow } /// State associated with the current target for propagating data to observers. - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] private sealed class ObserversState { /// The owning SourceObservable. @@ -2526,7 +2497,6 @@ namespace System.Threading.Tasks.Dataflow /// Forwards an item to all currently subscribed observers. /// The item to forward. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private Task ProcessItemAsync(TOutput item) { Common.ContractAssertMonitorStatus(Observable._SubscriptionLock, held: false); @@ -2588,7 +2558,6 @@ namespace System.Threading.Tasks.Dataflow /// Non-null when an unexpected exception occurs during processing. Faults /// all subscribed observers and resets the observable back to its original condition. /// - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void NotifyObserversOfCompletion(Exception targetException = null) { Debug.Assert(Target.Completion.IsCompleted, "The target must have already completed in order to notify of completion."); @@ -2696,7 +2665,6 @@ namespace System.Threading.Tasks.Dataflow } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Base/ISourceBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Base/ISourceBlock.cs index 54db561..8b54066 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Base/ISourceBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Base/ISourceBlock.cs @@ -28,7 +28,6 @@ namespace System.Threading.Tasks.Dataflow // IMPLEMENT EXPLICITLY /// - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#")] TOutput ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock target, out bool messageConsumed); /// diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/ActionBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/ActionBlock.cs index 5e56fc1..f687532 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/ActionBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/ActionBlock.cs @@ -151,7 +151,6 @@ namespace System.Threading.Tasks.Dataflow /// Processes the message with a user-provided action that returns a task. /// The action to use to process the message. /// The message to be processed. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ProcessMessageWithTask(Func action, KeyValuePair messageWithId) { Debug.Assert(action != null, "action needed for processing"); @@ -304,7 +303,6 @@ namespace System.Threading.Tasks.Dataflow } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BatchBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BatchBlock.cs index 72ed917..8c18c71 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BatchBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BatchBlock.cs @@ -24,7 +24,6 @@ namespace System.Threading.Tasks.Dataflow /// Specifies the type of data put into batches. [DebuggerDisplay("{DebuggerDisplayContent,nq}")] [DebuggerTypeProxy(typeof(BatchBlock<>.DebugView))] - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] public sealed class BatchBlock : IPropagatorBlock, IReceivableSourceBlock, IDebuggerDisplay { /// The target half of this batch. @@ -180,7 +179,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -246,7 +244,6 @@ namespace System.Threading.Tasks.Dataflow } /// Provides the core target implementation for a Batch. - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] [DebuggerDisplay("{DebuggerDisplayContent,nq}")] private sealed class BatchBlockTargetCore { @@ -435,7 +432,6 @@ namespace System.Threading.Tasks.Dataflow /// In general, it is not safe to pass releaseReservedMessages:true, because releasing of reserved messages /// is done without taking a lock. We pass releaseReservedMessages:true only when an exception has been /// caught inside the message processing loop which is a single instance at any given moment. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] internal void Complete(Exception exception, bool dropPendingMessages, bool releaseReservedMessages, bool revertProcessingState = false) { // Ensure that no new messages may be added @@ -666,7 +662,6 @@ namespace System.Threading.Tasks.Dataflow /// Task body used to process messages. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ProcessMessagesLoopCore() { Debug.Assert(_nonGreedyState != null, "Non-greedy state is required for non-greedy mode."); @@ -1086,7 +1081,6 @@ namespace System.Threading.Tasks.Dataflow /// Whether to allow an exception from a release to propagate immediately, /// or to delay propagation until all releases have been attempted. /// - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] internal void ReleaseReservedMessages(bool throwOnFirstException) { Common.ContractAssertMonitorStatus(IncomingLock, held: false); @@ -1164,7 +1158,6 @@ namespace System.Threading.Tasks.Dataflow internal DebuggingInformation GetDebuggingInformation() { return new DebuggingInformation(this); } /// Gets the object to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BatchedJoinBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BatchedJoinBlock.cs index f72a62b..4b961f5 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BatchedJoinBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BatchedJoinBlock.cs @@ -126,21 +126,18 @@ namespace System.Threading.Tasks.Dataflow public ITargetBlock Target2 { get { return _target2; } } /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public IDisposable LinkTo(ITargetBlock, IList>> target, DataflowLinkOptions linkOptions) { return _source.LinkTo(target, linkOptions); } /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public bool TryReceive(Predicate, IList>> filter, out Tuple, IList> item) { return _source.TryReceive(filter, out item); } /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public bool TryReceiveAll(out IList, IList>> items) { return _source.TryReceiveAll(out items); } /// @@ -212,7 +209,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -283,7 +279,6 @@ namespace System.Threading.Tasks.Dataflow /// Specifies the type of data accepted by the block's third target. [DebuggerDisplay("{DebuggerDisplayContent,nq}")] [DebuggerTypeProxy(typeof(BatchedJoinBlock<,,>.DebugView))] - [SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public sealed class BatchedJoinBlock : IReceivableSourceBlock, IList, IList>>, IDebuggerDisplay { /// The size of the batches generated by this BatchedJoin. @@ -398,14 +393,12 @@ namespace System.Threading.Tasks.Dataflow } /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public bool TryReceive(Predicate, IList, IList>> filter, out Tuple, IList, IList> item) { return _source.TryReceive(filter, out item); } /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public bool TryReceiveAll(out IList, IList, IList>> items) { return _source.TryReceiveAll(out items); } /// @@ -480,7 +473,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -651,7 +643,6 @@ namespace System.Threading.Tasks.Dataflow.Internal Task IDataflowBlock.Completion { get { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BroadcastBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BroadcastBlock.cs index 736055e..ab47133 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BroadcastBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BroadcastBlock.cs @@ -280,7 +280,6 @@ namespace System.Threading.Tasks.Dataflow } /// Task body used to consume postponed messages. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ConsumeMessagesLoopCore() { Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null, @@ -445,7 +444,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -503,7 +501,6 @@ namespace System.Threading.Tasks.Dataflow /// Provides a core implementation for blocks that implement . /// Specifies the type of data supplied by the . - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] [DebuggerDisplay("{DebuggerDisplayContent,nq}")] private sealed class BroadcastingSourceCore { @@ -886,7 +883,6 @@ namespace System.Threading.Tasks.Dataflow } /// Task body used to process messages. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void OfferMessagesLoopCore() { try @@ -1022,7 +1018,6 @@ namespace System.Threading.Tasks.Dataflow } /// - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] internal IDisposable LinkTo(ITargetBlock target, DataflowLinkOptions linkOptions) { // Validate arguments @@ -1201,7 +1196,6 @@ namespace System.Threading.Tasks.Dataflow internal DataflowBlockOptions DataflowBlockOptions { get { return _dataflowBlockOptions; } } /// Gets the object to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BufferBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BufferBlock.cs index cfbf0b7..d9dce57 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BufferBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BufferBlock.cs @@ -281,7 +281,6 @@ namespace System.Threading.Tasks.Dataflow /// Task body used to consume postponed messages. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ConsumeMessagesLoopCore() { Debug.Assert(_boundingState != null && _boundingState.TaskForInputProcessing != null, @@ -427,7 +426,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/JoinBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/JoinBlock.cs index 6772ead..b5d4052 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/JoinBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/JoinBlock.cs @@ -123,7 +123,6 @@ namespace System.Threading.Tasks.Dataflow } /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public bool TryReceiveAll(out IList> items) { return _source.TryReceiveAll(out items); } /// @@ -189,7 +188,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -259,7 +257,6 @@ namespace System.Threading.Tasks.Dataflow /// Specifies the type of data accepted by the block's third target. [DebuggerDisplay("{DebuggerDisplayContent,nq}")] [DebuggerTypeProxy(typeof(JoinBlock<,,>.DebugView))] - [SuppressMessage("Microsoft.Design", "CA1005:AvoidExcessiveParametersOnGenericTypes")] public sealed class JoinBlock : IReceivableSourceBlock>, IDebuggerDisplay { /// Resources shared by all targets for this join block. @@ -354,7 +351,6 @@ namespace System.Threading.Tasks.Dataflow } /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public bool TryReceiveAll(out IList> items) { return _source.TryReceiveAll(out items); } /// @@ -425,7 +421,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -904,7 +899,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// In general, it is not safe to pass releaseReservedMessages:true, because releasing of reserved messages /// is done without taking a lock. We pass releaseReservedMessages:true only when an exception has been /// caught inside the message processing loop which is a single instance at any given moment. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] internal override void CompleteCore(Exception exception, bool dropPendingMessages, bool releaseReservedMessages) { bool greedy = _sharedResources._dataflowBlockOptions.Greedy; @@ -963,7 +957,6 @@ namespace System.Threading.Tasks.Dataflow.Internal private int InputCountForDebugger { get { return _messages != null ? _messages.Count : _nonGreedy.ConsumedMessage.Key ? 1 : 0; } } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get @@ -1036,7 +1029,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Provides a container for resources shared across all targets used by the same BatchedJoin instance. - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] [DebuggerDisplay("{DebuggerDisplayContent,nq}")] internal sealed class JoinBlockTargetSharedResources { @@ -1370,7 +1362,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Task body used to process messages. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ProcessMessagesLoopCore() { Debug.Assert(!_dataflowBlockOptions.Greedy || _boundingState != null, "This only makes sense in non-greedy or bounding mode"); @@ -1461,8 +1452,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Gets the object to display in the debugger display attribute. - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformBlock.cs index d5bae02..1dacf7e 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformBlock.cs @@ -64,7 +64,6 @@ namespace System.Threading.Tasks.Dataflow /// Initializes the with the specified . /// The function to invoke with each data element received. /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public TransformBlock(Func> transform) : this(null, transform, ExecutionDataflowBlockOptions.Default) { } @@ -77,7 +76,6 @@ namespace System.Threading.Tasks.Dataflow /// The options with which to configure this . /// The is null (Nothing in Visual Basic). /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public TransformBlock(Func> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) : this(null, transform, dataflowBlockOptions) { } @@ -223,7 +221,6 @@ namespace System.Threading.Tasks.Dataflow /// Processes the message with a user-provided transform function that returns a task of TOutput. /// The transform function to use to process the message. /// The message to be processed. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ProcessMessageWithTask(Func> transform, KeyValuePair messageWithId) { Debug.Assert(transform != null, "Function to invoke is required."); @@ -398,7 +395,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.cs index 2355d1d..612ac2d 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.cs @@ -53,7 +53,6 @@ namespace System.Threading.Tasks.Dataflow /// will be made available as output from this . /// /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public TransformManyBlock(Func> transform) : this(transform, null, ExecutionDataflowBlockOptions.Default) { } @@ -66,7 +65,6 @@ namespace System.Threading.Tasks.Dataflow /// The options with which to configure this . /// The is null (Nothing in Visual Basic). /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public TransformManyBlock(Func> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) : this(transform, null, dataflowBlockOptions) { } @@ -77,7 +75,6 @@ namespace System.Threading.Tasks.Dataflow /// will be made available as output from this . /// /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public TransformManyBlock(Func>> transform) : this(null, transform, ExecutionDataflowBlockOptions.Default) { } @@ -90,7 +87,6 @@ namespace System.Threading.Tasks.Dataflow /// The options with which to configure this . /// The is null (Nothing in Visual Basic). /// The is null (Nothing in Visual Basic). - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public TransformManyBlock(Func>> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) : this(null, transform, dataflowBlockOptions) { } @@ -218,7 +214,6 @@ namespace System.Threading.Tasks.Dataflow /// Processes the message with a user-provided transform function that returns an observable. /// The transform function to use to process the message. /// The message to be processed. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ProcessMessageWithTask(Func>> function, KeyValuePair messageWithId) { Debug.Assert(function != null, "Function to invoke is required."); @@ -279,7 +274,6 @@ namespace System.Threading.Tasks.Dataflow /// Completes the processing of an asynchronous message. /// The completed task storing the output data generated for an input message. /// The originating message - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void AsyncCompleteProcessMessageWithTask( Task> completed, KeyValuePair messageWithId) { @@ -634,7 +628,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _source.DataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/WriteOnceBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/WriteOnceBlock.cs index 37cc854..8a0b29d 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/WriteOnceBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/WriteOnceBlock.cs @@ -110,7 +110,6 @@ namespace System.Threading.Tasks.Dataflow /// /// This must only be called once all of the completion conditions are met. /// - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] private void CompleteBlockAsync(IList exceptions) { Debug.Assert(_decliningPermanently, "We may get here only after we have started to decline permanently."); @@ -303,7 +302,6 @@ namespace System.Threading.Tasks.Dataflow } /// - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] public IDisposable LinkTo(ITargetBlock target, DataflowLinkOptions linkOptions) { // Validate arguments @@ -449,7 +447,6 @@ namespace System.Threading.Tasks.Dataflow } /// Offers the WriteOnceBlock's message to all targets. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private List OfferToTargets() { Common.ContractAssertMonitorStatus(ValueLock, held: false); @@ -515,7 +512,6 @@ namespace System.Threading.Tasks.Dataflow public override string ToString() { return Common.GetNameForDebugger(this, _dataflowBlockOptions); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/ActionOnDispose.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/ActionOnDispose.cs index ed5a06a..bb87f43 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/ActionOnDispose.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/ActionOnDispose.cs @@ -81,7 +81,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Gets whether the IDisposable has been disposed. - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] private bool Disposed { get { return _action == null; } } /// Invoke the action. @@ -124,7 +123,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Gets whether the IDisposable has been disposed. - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] private bool Disposed { get { return _action == null; } } /// Invoke the action. diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/Common.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/Common.cs index ef8e825..b915ca1 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/Common.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/Common.cs @@ -120,8 +120,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// /// The name of the object. /// This is used from DebuggerDisplay attributes. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] internal static string GetNameForDebugger( IDataflowBlock block, DataflowBlockOptions options = null) { @@ -206,7 +204,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// Initializes the stack trace and watson bucket of an inactive exception. /// The exception to initialize. /// The initialized exception. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] internal static Exception InitializeStackTrace(Exception exception) { Debug.Assert(exception != null && exception.StackTrace == null, @@ -223,7 +220,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// The Exception whose Data collection should store message information. /// The message information to be stored. /// Whether to store the data into the exception's inner exception(s) in addition to the exception itself. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] internal static void StoreDataflowMessageValueIntoExceptionData(Exception exc, T messageValue, bool targetInnerExceptions = false) { Debug.Assert(exc != null, "The exception into which data should be stored must be provided."); @@ -268,7 +264,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// The key. /// The value to be serialized as a string and stored. /// If the key is already present in the exception's data dictionary, the value is not overwritten. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private static void StoreStringIntoExceptionData(Exception exception, string key, string value) { Debug.Assert(exception != null, "An exception is needed to store the data into."); @@ -369,7 +364,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// Creates a task canceled with the specified cancellation token. /// Specifies the type of the result for this task. /// The canceled task. - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] internal static Task CreateTaskFromCancellation(CancellationToken cancellationToken) { Debug.Assert(cancellationToken.IsCancellationRequested, @@ -468,8 +462,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// Task to be started. /// TaskScheduler to schedule the task on. /// null on success, an exception reference on scheduling error. In the latter case, the task reference is nulled out. - [SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private static Exception StartTaskSafeCore(Task task, TaskScheduler scheduler) { Debug.Assert(task != null, "Task to start is needed."); @@ -497,7 +489,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// Pops and explicitly releases postponed messages after the block is done with processing. /// No locks should be held at this time. Unfortunately we cannot assert that. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] internal static void ReleaseAllPostponedMessages(ITargetBlock target, QueuedMap, DataflowMessageHeader> postponedMessages, ref List exceptions) @@ -690,7 +681,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// to ensure that the resulting task can't be upcast to something /// that in the future could lead to compat problems. /// - [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] [DebuggerNonUserCode] internal struct VoidResult { } } diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/DataflowEtwProvider.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/DataflowEtwProvider.cs index dc0b126..db0c6a7 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/DataflowEtwProvider.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/DataflowEtwProvider.cs @@ -125,7 +125,6 @@ namespace System.Threading.Tasks.Dataflow.Internal #region Block Completion /// Trace an event for a block completing. /// The block that's completing. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] [NonEvent] internal void DataflowBlockCompleted(IDataflowBlock block) { diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/SourceCore.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/SourceCore.cs index c1f4679..57f701a 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/SourceCore.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/SourceCore.cs @@ -28,7 +28,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// Provides a core implementation for blocks that implement . /// Specifies the type of data supplied by the . - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] [DebuggerDisplay("{DebuggerDisplayContent,nq}")] internal sealed class SourceCore { @@ -123,7 +122,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] internal IDisposable LinkTo(ITargetBlock target, DataflowLinkOptions linkOptions) { // Validate arguments @@ -792,7 +790,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Task body used to process messages. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void OfferMessagesLoopCore() { Debug.Assert(_taskForOutputProcessing != null && _taskForOutputProcessing.Id == Task.CurrentId, @@ -980,7 +977,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Gets the object to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/SpscTargetCore.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/SpscTargetCore.cs index 3f30d42..f742443 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/SpscTargetCore.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/SpscTargetCore.cs @@ -157,7 +157,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// Schedules a consumer task if there's none currently running. /// Whether the new consumer is being scheduled to replace a currently running consumer. - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] private void ScheduleConsumerIfNecessary(bool isReplica) { // If there's currently no active task... @@ -191,7 +190,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Task body used to process messages. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ProcessMessagesLoopCore() { Debug.Assert( @@ -375,7 +373,6 @@ namespace System.Threading.Tasks.Dataflow.Internal internal DebuggingInformation GetDebuggingInformation() { return new DebuggingInformation(this); } /// Gets the object to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetCore.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetCore.cs index ad73a8a..f3aa761 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetCore.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetCore.cs @@ -42,7 +42,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// /// Provides a core implementation of . /// Specifies the type of data accepted by the . - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] [DebuggerDisplay("{DebuggerDisplayContent,nq}")] internal sealed class TargetCore { @@ -350,7 +349,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// Slow path for ProcessAsyncIfNecessary. /// Separating out the slow path into its own method makes it more likely that the fast path method will get inlined. /// - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] private void ProcessAsyncIfNecessary_Slow(bool repeat) { Debug.Assert(HasRoomForMoreServiceTasks, "There must be room to process asynchronously."); @@ -397,7 +395,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Task body used to process messages. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private void ProcessMessagesLoopCore() { Common.ContractAssertMonitorStatus(IncomingLock, held: false); @@ -523,7 +520,6 @@ namespace System.Threading.Tasks.Dataflow.Internal /// Retrieves the next message from the input queue for the useAsyncCompletion mode. /// The next message retrieved. /// true if a message was found and removed; otherwise, false. - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] private bool TryGetNextMessageForNewAsyncOperation(out KeyValuePair messageWithId) { Debug.Assert(UsesAsyncCompletion, "Only valid to use when in async mode."); @@ -822,7 +818,6 @@ namespace System.Threading.Tasks.Dataflow.Internal } /// Gets the object to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetRegistry.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetRegistry.cs index f3c78aa..c75a644 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetRegistry.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/TargetRegistry.cs @@ -360,7 +360,6 @@ namespace System.Threading.Tasks.Dataflow.Internal IDisposable ISourceBlock.LinkTo(ITargetBlock target, DataflowLinkOptions linkOptions) { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } /// The data to display in the debugger display attribute. - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")] private object DebuggerDisplayContent { get diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/CommittableTransaction.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/CommittableTransaction.cs index f564ba4..8c5a264 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/CommittableTransaction.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/CommittableTransaction.cs @@ -7,7 +7,6 @@ using System.Threading; namespace System.Transactions { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Serialization not yet supported and will be done using DistributedTransaction")] public sealed class CommittableTransaction : Transaction, IAsyncResult { internal bool _completedSynchronously = false; diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DependentTransaction.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DependentTransaction.cs index 4ca8232..dbc56cd 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DependentTransaction.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DependentTransaction.cs @@ -6,7 +6,6 @@ using System.Diagnostics; namespace System.Transactions { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Serialization not yet supported and will be done using DistributedTransaction")] public sealed class DependentTransaction : Transaction { private readonly bool _blocking; diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/SubordinateTransaction.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/SubordinateTransaction.cs index 5fed0b7..860e281 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/SubordinateTransaction.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/SubordinateTransaction.cs @@ -4,7 +4,6 @@ namespace System.Transactions { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Serialization not yet supported and will be done using DistributedTransaction")] public sealed class SubordinateTransaction : Transaction { // Create a transaction with the given settings diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs index 66b94ca..8966661 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/Transaction.cs @@ -53,7 +53,6 @@ namespace System.Transactions // When we serialize a Transaction, we specify the type DistributedTransaction, so a Transaction never // actually gets deserialized. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229", Justification = "Serialization not yet supported and will be done using DistributedTransaction")] public class Transaction : IDisposable, ISerializable { // UseServiceDomain diff --git a/src/libraries/System.Web.HttpUtility/src/System/Web/Util/HttpEncoder.cs b/src/libraries/System.Web.HttpUtility/src/System/Web/Util/HttpEncoder.cs index a0f2d4a..26adef0 100644 --- a/src/libraries/System.Web.HttpUtility/src/System/Web/Util/HttpEncoder.cs +++ b/src/libraries/System.Web.HttpUtility/src/System/Web/Util/HttpEncoder.cs @@ -607,8 +607,6 @@ namespace System.Web.Util return sb.ToString(); } - [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", - Justification = "Does not represent an entire URL, just a portion.")] [return: NotNullIfNotNull("value")] internal static string? UrlPathEncode(string? value) { @@ -635,8 +633,6 @@ namespace System.Web.Util } // This is the original UrlPathEncode(string) - [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", - Justification = "Does not represent an entire URL, just a portion.")] private static string UrlPathEncodeImpl(string value) { if (string.IsNullOrEmpty(value)) -- 2.7.4