From 3f9c23a6eeca10cfd31db0fba47bb0408ce0453e Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Mon, 7 Dec 2015 20:15:37 -0800 Subject: [PATCH] Remove `[SuppressMessage]`s - build break --- src/Microsoft.AspNet.TestHost/ClientHandler.cs | 5 +---- src/Microsoft.AspNet.TestHost/RequestBuilder.cs | 5 ----- src/Microsoft.AspNet.TestHost/ResponseStream.cs | 3 --- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Microsoft.AspNet.TestHost/ClientHandler.cs b/src/Microsoft.AspNet.TestHost/ClientHandler.cs index 200dc5db9a..30a48d38aa 100644 --- a/src/Microsoft.AspNet.TestHost/ClientHandler.cs +++ b/src/Microsoft.AspNet.TestHost/ClientHandler.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.IO; using System.Linq; @@ -37,7 +36,7 @@ namespace Microsoft.AspNet.TestHost { throw new ArgumentNullException(nameof(application)); } - + _application = application; // PathString.StartsWithSegments that we use below requires the base path to not end in a slash. @@ -204,8 +203,6 @@ namespace Microsoft.AspNet.TestHost } } - [SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", - Justification = "HttpResposneMessage must be returned to the caller.")] private HttpResponseMessage GenerateResponse() { _responseFeature.FireOnSendingHeaders(); diff --git a/src/Microsoft.AspNet.TestHost/RequestBuilder.cs b/src/Microsoft.AspNet.TestHost/RequestBuilder.cs index 2de21ead03..51b93fade0 100644 --- a/src/Microsoft.AspNet.TestHost/RequestBuilder.cs +++ b/src/Microsoft.AspNet.TestHost/RequestBuilder.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Diagnostics.CodeAnalysis; using System.IO; using System.Net.Http; using System.Threading.Tasks; @@ -12,8 +11,6 @@ namespace Microsoft.AspNet.TestHost /// /// Used to construct a HttpRequestMessage object. /// - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", - Justification = "HttpRequestMessage is disposed by HttpClient in SendAsync")] public class RequestBuilder { private readonly TestServer _server; @@ -24,7 +21,6 @@ namespace Microsoft.AspNet.TestHost /// /// /// - [SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings", Justification = "Not a full URI")] public RequestBuilder(TestServer server, string path) { if (server == null) @@ -90,7 +86,6 @@ namespace Microsoft.AspNet.TestHost /// Set the request method to GET and start processing the request. /// /// - [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "GET is an HTTP verb.")] public Task GetAsync() { _req.Method = HttpMethod.Get; diff --git a/src/Microsoft.AspNet.TestHost/ResponseStream.cs b/src/Microsoft.AspNet.TestHost/ResponseStream.cs index 314bbec048..55b318309a 100644 --- a/src/Microsoft.AspNet.TestHost/ResponseStream.cs +++ b/src/Microsoft.AspNet.TestHost/ResponseStream.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Concurrent; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.IO; using System.Threading; @@ -370,8 +369,6 @@ namespace Microsoft.AspNet.TestHost } } - [SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "_writeLock", Justification = "ODEs from the locks would mask IOEs from abort.")] - [SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "_readLock", Justification = "Data can still be read unless we get aborted.")] protected override void Dispose(bool disposing) { if (disposing)