mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 03:55:55 +00:00
Add comments to concrete types
We now have a build task that copies comments from interface to implementation.
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Octokit
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the connection for making HTTP requests.
|
||||
/// The underlying connection.
|
||||
/// </summary>
|
||||
public IConnection Connection { get; private set; }
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ namespace Octokit
|
||||
{
|
||||
// NOTE: Every request method must go through the `RunRequest` code path. So if you need to add a new method
|
||||
// ensure it goes through there. :)
|
||||
/// <summary>
|
||||
/// A connection for making HTTP requests against URI endpoints.
|
||||
/// </summary>
|
||||
public class Connection : IConnection
|
||||
{
|
||||
static readonly Uri _defaultGitHubApiUrl = GitHubClient.GitHubApiUrl;
|
||||
@@ -124,6 +127,12 @@ namespace Octokit
|
||||
return SendData<T>(uri.ApplyParameters(parameters), HttpMethod.Get, null, accepts, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP GET request that expects a <seealso cref="IResponse"/> containing HTML.
|
||||
/// </summary>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <param name="parameters">Querystring parameters for the request</param>
|
||||
/// <returns><seealso cref="IResponse"/> representing the received HTTP response</returns>
|
||||
public Task<IResponse<string>> GetHtml(Uri uri, IDictionary<string, string> parameters)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
@@ -205,6 +214,11 @@ namespace Octokit
|
||||
return Run<T>(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP PUT request that expects an empty response.
|
||||
/// </summary>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
|
||||
public async Task<HttpStatusCode> PutAsync(Uri uri)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
@@ -218,6 +232,11 @@ namespace Octokit
|
||||
return response.StatusCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP DELETE request that expects an empty response.
|
||||
/// </summary>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
|
||||
public async Task<HttpStatusCode> DeleteAsync(Uri uri)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
@@ -231,17 +250,23 @@ namespace Octokit
|
||||
return response.StatusCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Base address for the connection.
|
||||
/// </summary>
|
||||
public Uri BaseAddress { get; private set; }
|
||||
|
||||
public string UserAgent { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <seealso cref="ICredentialStore"/> used to provide credentials for the connection.
|
||||
/// </summary>
|
||||
public ICredentialStore CredentialStore
|
||||
{
|
||||
get { return _authenticator.CredentialStore; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convenience property for getting and setting credentials.
|
||||
/// Gets or sets the credentials used by the connection.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// You can use this property if you only have a single hard-coded credential. Otherwise, pass in an
|
||||
|
||||
@@ -10,6 +10,12 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Octokit.Internal
|
||||
{
|
||||
/// <summary>
|
||||
/// Generic Http client. Useful for those who want to swap out System.Net.HttpClient with something else.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Most folks won't ever need to swap this out. But if you're trying to run this on Windows Phone, you might.
|
||||
/// </remarks>
|
||||
public class HttpClientAdapter : IHttpClient
|
||||
{
|
||||
public async Task<IResponse<T>> Send<T>(IRequest request)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
@@ -99,6 +100,12 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// Gets or sets the credentials used by the connection.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// You can use this property if you only have a single hard-coded credential. Otherwise, pass in an
|
||||
/// <see cref="ICredentialStore"/> to the constructor.
|
||||
/// Setting this property will change the <see cref="ICredentialStore"/> to use
|
||||
/// the default <see cref="InMemoryCredentialStore"/> with just these credentials.
|
||||
/// </remarks>
|
||||
Credentials Credentials { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user