Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Remove [SuppressMessage]s
Browse files Browse the repository at this point in the history
- build break
  • Loading branch information
dougbu committed Dec 8, 2015
1 parent 0f09991 commit 3f9c23a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
5 changes: 1 addition & 4 deletions src/Microsoft.AspNet.TestHost/ClientHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -37,7 +36,7 @@ public ClientHandler(PathString pathBase, IHttpApplication<Context> application)
{
throw new ArgumentNullException(nameof(application));
}

_application = application;

// PathString.StartsWithSegments that we use below requires the base path to not end in a slash.
Expand Down Expand Up @@ -204,8 +203,6 @@ internal void ReturnResponseMessage()
}
}

[SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope",
Justification = "HttpResposneMessage must be returned to the caller.")]
private HttpResponseMessage GenerateResponse()
{
_responseFeature.FireOnSendingHeaders();
Expand Down
5 changes: 0 additions & 5 deletions src/Microsoft.AspNet.TestHost/RequestBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -12,8 +11,6 @@ namespace Microsoft.AspNet.TestHost
/// <summary>
/// Used to construct a HttpRequestMessage object.
/// </summary>
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable",
Justification = "HttpRequestMessage is disposed by HttpClient in SendAsync")]
public class RequestBuilder
{
private readonly TestServer _server;
Expand All @@ -24,7 +21,6 @@ public class RequestBuilder
/// </summary>
/// <param name="server"></param>
/// <param name="path"></param>
[SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings", Justification = "Not a full URI")]
public RequestBuilder(TestServer server, string path)
{
if (server == null)
Expand Down Expand Up @@ -90,7 +86,6 @@ public Task<HttpResponseMessage> SendAsync(string method)
/// Set the request method to GET and start processing the request.
/// </summary>
/// <returns></returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "GET is an HTTP verb.")]
public Task<HttpResponseMessage> GetAsync()
{
_req.Method = HttpMethod.Get;
Expand Down
3 changes: 0 additions & 3 deletions src/Microsoft.AspNet.TestHost/ResponseStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.Collections.Concurrent;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.IO;
using System.Threading;
Expand Down Expand Up @@ -370,8 +369,6 @@ private void CheckAborted()
}
}

[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)
Expand Down

0 comments on commit 3f9c23a

Please sign in to comment.