Skip to content

Commit

Permalink
tidy up some xml-docs while i'm in here
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Nov 3, 2015
1 parent 50a2b97 commit bfb0559
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 7 deletions.
10 changes: 10 additions & 0 deletions Octokit/Clients/IRepositoryContentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,21 @@ public interface IRepositoryContentsClient
Task DeleteFile(string owner, string name, string path, DeleteFileRequest request);
}

/// <summary>
/// The archive format to return from the server
/// </summary>
public enum ArchiveFormat
{
/// <summary>
/// The TAR archive format
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Tarball")]
[Parameter(Value = "tarball")]
Tarball,

/// <summary>
/// The ZIP archive format
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Zipball")]
[Parameter(Value = "zipball")]
Zipball
Expand Down
4 changes: 4 additions & 0 deletions Octokit/Clients/OAuthClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public class OauthClient : IOauthClient
readonly IConnection connection;
readonly Uri hostAddress;

/// <summary>
/// Create an instance of the OauthClient
/// </summary>
/// <param name="connection">The underlying connection to use</param>
public OauthClient(IConnection connection)
{
Ensure.ArgumentNotNull(connection, "connection");
Expand Down
19 changes: 19 additions & 0 deletions Octokit/Http/ApiResponse.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
namespace Octokit.Internal
{
/// <summary>
/// Wrapper for a response from the API
/// </summary>
/// <typeparam name="T">Payload contained in the response</typeparam>
public class ApiResponse<T> : IApiResponse<T>
{
/// <summary>
/// Create a ApiResponse from an existing request
/// </summary>
/// <param name="response">An existing request to wrap</param>
public ApiResponse(IResponse response) : this(response, GetBodyAsObject(response))
{
}

/// <summary>
/// Create a ApiResponse from an existing request and object
/// </summary>
/// <param name="response">An existing request to wrap</param>
/// <param name="bodyAsObject">The payload from an existing request</param>
public ApiResponse(IResponse response, T bodyAsObject)
{
Ensure.ArgumentNotNull(response, "response");
Expand All @@ -14,8 +27,14 @@ public ApiResponse(IResponse response, T bodyAsObject)
Body = bodyAsObject;
}

/// <summary>
/// The payload of the response
/// </summary>
public T Body { get; private set; }

/// <summary>
/// The context of the response
/// </summary>
public IResponse HttpResponse { get; private set; }

static T GetBodyAsObject(IResponse response)
Expand Down
4 changes: 2 additions & 2 deletions Octokit/Http/HttpVerb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Expand Down
7 changes: 7 additions & 0 deletions Octokit/Http/ICredentialStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@

namespace Octokit
{
/// <summary>
/// Abstraction for interacting with credentials
/// </summary>
public interface ICredentialStore
{
/// <summary>
/// Retrieve the credentials from the underlying store
/// </summary>
/// <returns>A continuation containing credentials</returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification="Nope")]
Task<Credentials> GetCredentials();
}
Expand Down
11 changes: 11 additions & 0 deletions Octokit/Http/InMemoryCredentialStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@

namespace Octokit.Internal
{
/// <summary>
/// Abstraction for interacting with credentials
/// </summary>
public class InMemoryCredentialStore : ICredentialStore
{
readonly Credentials _credentials;

/// <summary>
/// Create an instance of the InMemoryCredentialStore
/// </summary>
/// <param name="credentials"></param>
public InMemoryCredentialStore(Credentials credentials)
{
Ensure.ArgumentNotNull(credentials, "credentials");

_credentials = credentials;
}

/// <summary>
/// Retrieve the credentials from the underlying store
/// </summary>
/// <returns>A continuation containing credentials</returns>
public Task<Credentials> GetCredentials()
{
return Task.FromResult(_credentials);
Expand Down
11 changes: 11 additions & 0 deletions Octokit/Models/Response/Meta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ namespace Octokit
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class Meta
{
/// <summary>
/// Create an instance of the Meta
/// </summary>
public Meta()
{
}

/// <summary>
/// Create an instance of the Meta
/// </summary>
/// <param name="verifiablePasswordAuthentication">Whether authentication with username and password is supported.</param>
/// <param name="gitHubServicesSha">The currently-deployed SHA of github-services.</param>
/// <param name="hooks">An array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from on GitHub.com.</param>
/// <param name="git">An array of IP addresses in CIDR format specifying the Git servers for the GitHub server</param>
/// <param name="pages">An array of IP addresses in CIDR format specifying the A records for GitHub Pages.</param>
public Meta(
bool verifiablePasswordAuthentication,
string gitHubServicesSha,
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bfb0559

Please sign in to comment.