From bfb0559351b59cbd6444d17c4a0c448a5da0ff7d Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Mon, 2 Nov 2015 17:48:39 -0800 Subject: [PATCH] tidy up some xml-docs while i'm in here --- Octokit/Clients/IRepositoryContentsClient.cs | 10 ++++++++++ Octokit/Clients/OAuthClient.cs | 4 ++++ Octokit/Http/ApiResponse.cs | 19 +++++++++++++++++++ Octokit/Http/HttpVerb.cs | 4 ++-- Octokit/Http/ICredentialStore.cs | 7 +++++++ Octokit/Http/InMemoryCredentialStore.cs | 11 +++++++++++ Octokit/Models/Response/Meta.cs | 11 +++++++++++ README.md | 5 ----- 8 files changed, 64 insertions(+), 7 deletions(-) diff --git a/Octokit/Clients/IRepositoryContentsClient.cs b/Octokit/Clients/IRepositoryContentsClient.cs index d2923478..ba255103 100644 --- a/Octokit/Clients/IRepositoryContentsClient.cs +++ b/Octokit/Clients/IRepositoryContentsClient.cs @@ -167,11 +167,21 @@ namespace Octokit Task DeleteFile(string owner, string name, string path, DeleteFileRequest request); } + /// + /// The archive format to return from the server + /// public enum ArchiveFormat { + /// + /// The TAR archive format + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Tarball")] [Parameter(Value = "tarball")] Tarball, + + /// + /// The ZIP archive format + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Zipball")] [Parameter(Value = "zipball")] Zipball diff --git a/Octokit/Clients/OAuthClient.cs b/Octokit/Clients/OAuthClient.cs index 76499cc3..d283b5a4 100644 --- a/Octokit/Clients/OAuthClient.cs +++ b/Octokit/Clients/OAuthClient.cs @@ -12,6 +12,10 @@ namespace Octokit readonly IConnection connection; readonly Uri hostAddress; + /// + /// Create an instance of the OauthClient + /// + /// The underlying connection to use public OauthClient(IConnection connection) { Ensure.ArgumentNotNull(connection, "connection"); diff --git a/Octokit/Http/ApiResponse.cs b/Octokit/Http/ApiResponse.cs index 8b1c117c..d677af0c 100644 --- a/Octokit/Http/ApiResponse.cs +++ b/Octokit/Http/ApiResponse.cs @@ -1,11 +1,24 @@ namespace Octokit.Internal { + /// + /// Wrapper for a response from the API + /// + /// Payload contained in the response public class ApiResponse : IApiResponse { + /// + /// Create a ApiResponse from an existing request + /// + /// An existing request to wrap public ApiResponse(IResponse response) : this(response, GetBodyAsObject(response)) { } + /// + /// Create a ApiResponse from an existing request and object + /// + /// An existing request to wrap + /// The payload from an existing request public ApiResponse(IResponse response, T bodyAsObject) { Ensure.ArgumentNotNull(response, "response"); @@ -14,8 +27,14 @@ Body = bodyAsObject; } + /// + /// The payload of the response + /// public T Body { get; private set; } + /// + /// The context of the response + /// public IResponse HttpResponse { get; private set; } static T GetBodyAsObject(IResponse response) diff --git a/Octokit/Http/HttpVerb.cs b/Octokit/Http/HttpVerb.cs index 8454e65a..ad49fb78 100644 --- a/Octokit/Http/HttpVerb.cs +++ b/Octokit/Http/HttpVerb.cs @@ -2,11 +2,11 @@ namespace Octokit.Internal { - public static class HttpVerb + internal static class HttpVerb { static readonly HttpMethod patch = new HttpMethod("PATCH"); - public static HttpMethod Patch + internal static HttpMethod Patch { get { return patch; } } diff --git a/Octokit/Http/ICredentialStore.cs b/Octokit/Http/ICredentialStore.cs index d605678a..19e99b50 100644 --- a/Octokit/Http/ICredentialStore.cs +++ b/Octokit/Http/ICredentialStore.cs @@ -3,8 +3,15 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// Abstraction for interacting with credentials + /// public interface ICredentialStore { + /// + /// Retrieve the credentials from the underlying store + /// + /// A continuation containing credentials [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification="Nope")] Task GetCredentials(); } diff --git a/Octokit/Http/InMemoryCredentialStore.cs b/Octokit/Http/InMemoryCredentialStore.cs index 33bce5d0..04ceec9e 100644 --- a/Octokit/Http/InMemoryCredentialStore.cs +++ b/Octokit/Http/InMemoryCredentialStore.cs @@ -2,10 +2,17 @@ namespace Octokit.Internal { + /// + /// Abstraction for interacting with credentials + /// public class InMemoryCredentialStore : ICredentialStore { readonly Credentials _credentials; + /// + /// Create an instance of the InMemoryCredentialStore + /// + /// public InMemoryCredentialStore(Credentials credentials) { Ensure.ArgumentNotNull(credentials, "credentials"); @@ -13,6 +20,10 @@ namespace Octokit.Internal _credentials = credentials; } + /// + /// Retrieve the credentials from the underlying store + /// + /// A continuation containing credentials public Task GetCredentials() { return Task.FromResult(_credentials); diff --git a/Octokit/Models/Response/Meta.cs b/Octokit/Models/Response/Meta.cs index 66720825..7c829bfa 100644 --- a/Octokit/Models/Response/Meta.cs +++ b/Octokit/Models/Response/Meta.cs @@ -11,10 +11,21 @@ namespace Octokit [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Meta { + /// + /// Create an instance of the Meta + /// public Meta() { } + /// + /// Create an instance of the Meta + /// + /// Whether authentication with username and password is supported. + /// The currently-deployed SHA of github-services. + /// An array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from on GitHub.com. + /// An array of IP addresses in CIDR format specifying the Git servers for the GitHub server + /// An array of IP addresses in CIDR format specifying the A records for GitHub Pages. public Meta( bool verifiablePasswordAuthentication, string gitHubServicesSha, diff --git a/README.md b/README.md index da695d96..c945222d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ ![logo](octokit-dotnet_2.png) - Octokit is a client library targeting .NET 4.5 and above that provides an easy way to interact with the [GitHub API](http://developer.github.com/v3/). @@ -64,10 +63,6 @@ cd Octokit Visit the [Contributor Guidelines](https://github.com/octokit/octokit.net/blob/master/CONTRIBUTING.md) for more details. -## Build Server - -The builds and tests for Octokit.net are run on [AppVeyor](http://www.appveyor.com). This enables us to build and test incoming pull requests: https://ci.appveyor.com/project/Haacked15676/octokit-net - ## Problems? Octokit is 100% certified to be bug free. If you find an issue with our