added xml documentation

This commit is contained in:
aedampir@gmail.com
2016-06-06 13:59:32 +07:00
parent 9464419976
commit 04d3a2da95
4 changed files with 42 additions and 29 deletions

View File

@@ -3,6 +3,12 @@ using System.Diagnostics.CodeAnalysis;
namespace Octokit.Reactive namespace Octokit.Reactive
{ {
/// <summary>
/// A client for GitHub's Repository Commits API.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/commits/">Repository Commits API documentation</a> for more information.
/// </remarks>
public interface IObservableRepositoryCommitsClient public interface IObservableRepositoryCommitsClient
{ {
/// <summary> /// <summary>
@@ -12,7 +18,7 @@ namespace Octokit.Reactive
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="base">The reference to use as the base commit</param> /// <param name="base">The reference to use as the base commit</param>
/// <param name="head">The reference to use as the head commit</param> /// <param name="head">The reference to use as the head commit</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{CompareResult}"/> of <see cref="CompareResult"/> for the specified references.</returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "base")] [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "base")]
IObservable<CompareResult> Compare(string owner, string name, string @base, string head); IObservable<CompareResult> Compare(string owner, string name, string @base, string head);
@@ -22,7 +28,7 @@ namespace Octokit.Reactive
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="reference">The reference for the commit</param> /// <param name="reference">The reference for the commit</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{CompareResult}"/> of <see cref="GitHubCommit"/> for the specified commit SHA.</returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")] Justification = "Method makes a network request")]
IObservable<GitHubCommit> Get(string owner, string name, string reference); IObservable<GitHubCommit> Get(string owner, string name, string reference);
@@ -32,7 +38,7 @@ namespace Octokit.Reactive
/// </summary> /// </summary>
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
IObservable<GitHubCommit> GetAll(string owner, string name); IObservable<GitHubCommit> GetAll(string owner, string name);
/// <summary> /// <summary>
@@ -41,7 +47,7 @@ namespace Octokit.Reactive
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param> /// <param name="options">Options for changing the API response</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
IObservable<GitHubCommit> GetAll(string owner, string name, ApiOptions options); IObservable<GitHubCommit> GetAll(string owner, string name, ApiOptions options);
/// <summary> /// <summary>
@@ -50,7 +56,7 @@ namespace Octokit.Reactive
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter list of commits returned</param> /// <param name="request">Used to filter list of commits returned</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
IObservable<GitHubCommit> GetAll(string owner, string name, CommitRequest request); IObservable<GitHubCommit> GetAll(string owner, string name, CommitRequest request);
/// <summary> /// <summary>
@@ -60,7 +66,7 @@ namespace Octokit.Reactive
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter list of commits returned</param> /// <param name="request">Used to filter list of commits returned</param>
/// <param name="options">Options for changing the API response</param> /// <param name="options">Options for changing the API response</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
IObservable<GitHubCommit> GetAll(string owner, string name, CommitRequest request, ApiOptions options); IObservable<GitHubCommit> GetAll(string owner, string name, CommitRequest request, ApiOptions options);
/// <summary> /// <summary>
@@ -69,7 +75,7 @@ namespace Octokit.Reactive
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="reference">The repository reference</param> /// <param name="reference">The repository reference</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="string"/> for the specified repository reference.</returns>
IObservable<string> GetSha1(string owner, string name, string reference); IObservable<string> GetSha1(string owner, string name, string reference);
} }
} }

View File

@@ -4,6 +4,12 @@ using Octokit.Reactive.Internal;
namespace Octokit.Reactive namespace Octokit.Reactive
{ {
/// <summary>
/// A client for GitHub's Repository Commits API.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/commits/">Repository Commits API documentation</a> for more information.
/// </remarks>
public class ObservableRepositoryCommitsClient : IObservableRepositoryCommitsClient public class ObservableRepositoryCommitsClient : IObservableRepositoryCommitsClient
{ {
readonly IConnection _connection; readonly IConnection _connection;
@@ -24,7 +30,7 @@ namespace Octokit.Reactive
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="base">The reference to use as the base commit</param> /// <param name="base">The reference to use as the base commit</param>
/// <param name="head">The reference to use as the head commit</param> /// <param name="head">The reference to use as the head commit</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{CompareResult}"/> of <see cref="CompareResult"/> for the specified references.</returns>
public IObservable<CompareResult> Compare(string owner, string name, string @base, string head) public IObservable<CompareResult> Compare(string owner, string name, string @base, string head)
{ {
return _commit.Compare(owner, name, @base, head).ToObservable(); return _commit.Compare(owner, name, @base, head).ToObservable();
@@ -36,7 +42,7 @@ namespace Octokit.Reactive
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="reference">The reference for the commit</param> /// <param name="reference">The reference for the commit</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{CompareResult}"/> of <see cref="GitHubCommit"/> for the specified commit SHA.</returns>
public IObservable<GitHubCommit> Get(string owner, string name, string reference) public IObservable<GitHubCommit> Get(string owner, string name, string reference)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -51,7 +57,7 @@ namespace Octokit.Reactive
/// </summary> /// </summary>
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
public IObservable<GitHubCommit> GetAll(string owner, string name) public IObservable<GitHubCommit> GetAll(string owner, string name)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -66,7 +72,7 @@ namespace Octokit.Reactive
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param> /// <param name="options">Options for changing the API response</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
public IObservable<GitHubCommit> GetAll(string owner, string name, ApiOptions options) public IObservable<GitHubCommit> GetAll(string owner, string name, ApiOptions options)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -82,7 +88,7 @@ namespace Octokit.Reactive
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter list of commits returned</param> /// <param name="request">Used to filter list of commits returned</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
public IObservable<GitHubCommit> GetAll(string owner, string name, CommitRequest request) public IObservable<GitHubCommit> GetAll(string owner, string name, CommitRequest request)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -99,7 +105,7 @@ namespace Octokit.Reactive
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter list of commits returned</param> /// <param name="request">Used to filter list of commits returned</param>
/// <param name="options">Options for changing the API response</param> /// <param name="options">Options for changing the API response</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
public IObservable<GitHubCommit> GetAll(string owner, string name, CommitRequest request, ApiOptions options) public IObservable<GitHubCommit> GetAll(string owner, string name, CommitRequest request, ApiOptions options)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -115,7 +121,7 @@ namespace Octokit.Reactive
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="reference">The repository reference</param> /// <param name="reference">The repository reference</param>
/// <returns></returns> /// <returns>A <see cref="IObservable{GitHubCommit}"/> of <see cref="string"/> for the specified repository reference.</returns>
public IObservable<string> GetSha1(string owner, string name, string reference) public IObservable<string> GetSha1(string owner, string name, string reference)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");

View File

@@ -19,7 +19,7 @@ namespace Octokit
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="base">The reference to use as the base commit</param> /// <param name="base">The reference to use as the base commit</param>
/// <param name="head">The reference to use as the head commit</param> /// <param name="head">The reference to use as the head commit</param>
/// <returns></returns> /// <returns>A <see cref="CompareResult"/> for the specified references.</returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "base")] [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "base")]
Task<CompareResult> Compare(string owner, string name, string @base, string head); Task<CompareResult> Compare(string owner, string name, string @base, string head);
@@ -29,7 +29,7 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="reference">The reference for the commit (SHA)</param> /// <param name="reference">The reference for the commit (SHA)</param>
/// <returns></returns> /// <returns>A <see cref="GitHubCommit"/> for the specified commit SHA.</returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Makes a network request")] Justification = "Makes a network request")]
Task<GitHubCommit> Get(string owner, string name, string reference); Task<GitHubCommit> Get(string owner, string name, string reference);
@@ -39,7 +39,7 @@ namespace Octokit
/// </summary> /// </summary>
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <returns></returns> /// <returns>A <see cref="IReadOnlyList{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name); Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name);
/// <summary> /// <summary>
@@ -48,7 +48,7 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param> /// <param name="options">Options for changing the API response</param>
/// <returns></returns> /// <returns>A <see cref="IReadOnlyList{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, ApiOptions options); Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, ApiOptions options);
/// <summary> /// <summary>
@@ -57,7 +57,7 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter list of commits returned</param> /// <param name="request">Used to filter list of commits returned</param>
/// <returns></returns> /// <returns>A <see cref="IReadOnlyList{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, CommitRequest request); Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, CommitRequest request);
/// <summary> /// <summary>
@@ -67,15 +67,16 @@ namespace Octokit
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter list of commits returned</param> /// <param name="request">Used to filter list of commits returned</param>
/// <param name="options">Options for changing the API response</param> /// <param name="options">Options for changing the API response</param>
/// <returns></returns> /// <returns>A <see cref="IReadOnlyList{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, CommitRequest request, ApiOptions options); Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, CommitRequest request, ApiOptions options);
/// <summary> /// <summary>
/// Get the SHA-1 of a commit reference /// Get the SHA-1 of a commit reference
/// </summary> /// </summary>
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="reference">The repository reference</param> /// <param name="reference">The repository reference</param>
/// <returns></returns> /// <returns>A <see cref="string"/> for the specified repository reference.</returns>
Task<string> GetSha1(string owner, string name, string reference); Task<string> GetSha1(string owner, string name, string reference);
} }
} }

View File

@@ -23,7 +23,7 @@ namespace Octokit
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="base">The reference to use as the base commit</param> /// <param name="base">The reference to use as the base commit</param>
/// <param name="head">The reference to use as the head commit</param> /// <param name="head">The reference to use as the head commit</param>
/// <returns></returns> /// <returns>A <see cref="CompareResult"/> for the specified references.</returns>
public Task<CompareResult> Compare(string owner, string name, string @base, string head) public Task<CompareResult> Compare(string owner, string name, string @base, string head)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -40,7 +40,7 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="reference">The reference for the commit (SHA)</param> /// <param name="reference">The reference for the commit (SHA)</param>
/// <returns></returns> /// <returns>A <see cref="GitHubCommit"/> for the specified commit SHA.</returns>
public Task<GitHubCommit> Get(string owner, string name, string reference) public Task<GitHubCommit> Get(string owner, string name, string reference)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -55,7 +55,7 @@ namespace Octokit
/// </summary> /// </summary>
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <returns></returns> /// <returns>A <see cref="IReadOnlyList{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name) public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -70,7 +70,7 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param> /// <param name="options">Options for changing the API response</param>
/// <returns></returns> /// <returns>A <see cref="IReadOnlyList{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, ApiOptions options) public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, ApiOptions options)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -78,14 +78,14 @@ namespace Octokit
return GetAll(owner, name, new CommitRequest(), options); return GetAll(owner, name, new CommitRequest(), options);
} }
/// <summary> /// <summary>
/// Gets all commits for a given repository /// Gets all commits for a given repository
/// </summary> /// </summary>
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter list of commits returned</param> /// <param name="request">Used to filter list of commits returned</param>
/// <returns></returns> /// <returns>A <see cref="IReadOnlyList{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, CommitRequest request) public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, CommitRequest request)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -102,7 +102,7 @@ namespace Octokit
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter list of commits returned</param> /// <param name="request">Used to filter list of commits returned</param>
/// <param name="options">Options for changing the API response</param> /// <param name="options">Options for changing the API response</param>
/// <returns></returns> /// <returns>A <see cref="IReadOnlyList{GitHubCommit}"/> of <see cref="GitHubCommit"/>s for the specified repository.</returns>
public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, CommitRequest request, ApiOptions options) public Task<IReadOnlyList<GitHubCommit>> GetAll(string owner, string name, CommitRequest request, ApiOptions options)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
@@ -118,7 +118,7 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param> /// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param> /// <param name="name">The name of the repository</param>
/// <param name="reference">The repository reference</param> /// <param name="reference">The repository reference</param>
/// <returns></returns> /// <returns>A <see cref="string"/> for the specified repository reference.</returns>
public Task<string> GetSha1(string owner, string name, string reference) public Task<string> GetSha1(string owner, string name, string reference)
{ {
Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(owner, "owner");