mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 18:35:35 +00:00
suppressing a bunch of stuff because murtaugh's law
This commit is contained in:
@@ -90,6 +90,7 @@ namespace Octokit
|
||||
/// The address to point this client to such as https://api.github.com or the URL to a GitHub Enterprise
|
||||
/// instance</param>
|
||||
/// <param name="credentialStore">Provides credentials to the client when making requests</param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
|
||||
public Connection(ProductHeaderValue productInformation, Uri baseAddress, ICredentialStore credentialStore)
|
||||
: this(productInformation, baseAddress, credentialStore, new HttpClientAdapter(), new SimpleJsonSerializer())
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
@@ -22,7 +23,7 @@ namespace Octokit.Internal
|
||||
|
||||
public HttpClientAdapter() { }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
|
||||
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
|
||||
public HttpClientAdapter(IWebProxy webProxy)
|
||||
{
|
||||
_webProxy = webProxy;
|
||||
@@ -30,7 +31,7 @@ namespace Octokit.Internal
|
||||
_http = new HttpClient(new RedirectHandler { InnerHandler = handler });
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
|
||||
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
|
||||
public HttpClientAdapter(IWebProxy webProxy, HttpMessageHandler handler)
|
||||
{
|
||||
Ensure.ArgumentNotNull(handler, "handler");
|
||||
@@ -61,6 +62,7 @@ namespace Octokit.Internal
|
||||
}
|
||||
}
|
||||
|
||||
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
|
||||
static CancellationToken GetCancellationTokenForRequest(IRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var cancellationTokenForRequest = cancellationToken;
|
||||
@@ -75,6 +77,7 @@ namespace Octokit.Internal
|
||||
return cancellationTokenForRequest;
|
||||
}
|
||||
|
||||
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
|
||||
HttpClientHandler GetHandler()
|
||||
{
|
||||
var httpOptions = new HttpClientHandler
|
||||
@@ -231,7 +234,8 @@ namespace Octokit.Internal
|
||||
return response;
|
||||
}
|
||||
|
||||
private static HttpRequestMessage CopyRequest(HttpRequestMessage oldRequest)
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
|
||||
static HttpRequestMessage CopyRequest(HttpRequestMessage oldRequest)
|
||||
{
|
||||
var newrequest = new HttpRequestMessage(oldRequest.Method, oldRequest.RequestUri);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user