Remove `[SuppressMessage]`s

- build break
This commit is contained in:
Doug Bunting 2015-12-07 20:15:37 -08:00
parent 0f0999161d
commit 3f9c23a6ee
3 changed files with 1 additions and 12 deletions

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts; using System.Diagnostics.Contracts;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
@ -37,7 +36,7 @@ namespace Microsoft.AspNet.TestHost
{ {
throw new ArgumentNullException(nameof(application)); throw new ArgumentNullException(nameof(application));
} }
_application = application; _application = application;
// PathString.StartsWithSegments that we use below requires the base path to not end in a slash. // 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() private HttpResponseMessage GenerateResponse()
{ {
_responseFeature.FireOnSendingHeaders(); _responseFeature.FireOnSendingHeaders();

View File

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using System.Diagnostics.CodeAnalysis;
using System.IO; using System.IO;
using System.Net.Http; using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -12,8 +11,6 @@ namespace Microsoft.AspNet.TestHost
/// <summary> /// <summary>
/// Used to construct a HttpRequestMessage object. /// Used to construct a HttpRequestMessage object.
/// </summary> /// </summary>
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable",
Justification = "HttpRequestMessage is disposed by HttpClient in SendAsync")]
public class RequestBuilder public class RequestBuilder
{ {
private readonly TestServer _server; private readonly TestServer _server;
@ -24,7 +21,6 @@ namespace Microsoft.AspNet.TestHost
/// </summary> /// </summary>
/// <param name="server"></param> /// <param name="server"></param>
/// <param name="path"></param> /// <param name="path"></param>
[SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings", Justification = "Not a full URI")]
public RequestBuilder(TestServer server, string path) public RequestBuilder(TestServer server, string path)
{ {
if (server == null) if (server == null)
@ -90,7 +86,6 @@ namespace Microsoft.AspNet.TestHost
/// Set the request method to GET and start processing the request. /// Set the request method to GET and start processing the request.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "GET is an HTTP verb.")]
public Task<HttpResponseMessage> GetAsync() public Task<HttpResponseMessage> GetAsync()
{ {
_req.Method = HttpMethod.Get; _req.Method = HttpMethod.Get;

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts; using System.Diagnostics.Contracts;
using System.IO; using System.IO;
using System.Threading; 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) protected override void Dispose(bool disposing)
{ {
if (disposing) if (disposing)