mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-21 14:45:11 +00:00
modified XML docs
modified parameters names added extra null checks
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
namespace Octokit.Reactive
|
namespace Octokit.Reactive
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A client for GitHub's Git Repository Status API.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// See the <a href="http://developer.github.com/v3/repos/statuses/">Repository Statuses API documentation</a> for more information.
|
||||||
|
/// </remarks>
|
||||||
public interface IObservableCommitStatusClient
|
public interface IObservableCommitStatusClient
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -12,7 +18,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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="IObservable{CommitStatus}"/> of <see cref="CommitStatus"/>es representing commit statuses for specified repository</returns>
|
||||||
IObservable<CommitStatus> GetAll(string owner, string name, string reference);
|
IObservable<CommitStatus> GetAll(string owner, string name, string reference);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -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="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</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{CommitStatus}"/> of <see cref="CommitStatus"/>es representing commit statuses for specified repository</returns>
|
||||||
IObservable<CommitStatus> GetAll(string owner, string name, string reference, ApiOptions options);
|
IObservable<CommitStatus> GetAll(string owner, string name, string reference, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -35,7 +41,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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="IObservable{CombinedCommitStatus}"/> of <see cref="CombinedCommitStatus"/> representing combined commit status for specified repository</returns>
|
||||||
IObservable<CombinedCommitStatus> GetCombined(string owner, string name, string reference);
|
IObservable<CombinedCommitStatus> GetCombined(string owner, string name, string reference);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -44,8 +50,8 @@ 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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <param name="commitStatus">The commit status to create</param>
|
/// <param name="newCommitStatus">The commit status to create</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="IObservable{CommitStatus}"/> of <see cref="CommitStatus"/> representing created commit status for specified repository</returns>
|
||||||
IObservable<CommitStatus> Create(string owner, string name, string reference, NewCommitStatus commitStatus);
|
IObservable<CommitStatus> Create(string owner, string name, string reference, NewCommitStatus newCommitStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,12 @@ using Octokit.Reactive.Internal;
|
|||||||
|
|
||||||
namespace Octokit.Reactive
|
namespace Octokit.Reactive
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A client for GitHub's Git Repository Status API.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// See the <a href="http://developer.github.com/v3/repos/statuses/">Repository Statuses API documentation</a> for more information.
|
||||||
|
/// </remarks>
|
||||||
public class ObservableCommitStatusClient : IObservableCommitStatusClient
|
public class ObservableCommitStatusClient : IObservableCommitStatusClient
|
||||||
{
|
{
|
||||||
readonly ICommitStatusClient _client;
|
readonly ICommitStatusClient _client;
|
||||||
@@ -25,7 +31,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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="IObservable{CommitStatus}"/> of <see cref="CommitStatus"/>es representing commit statuses for specified repository</returns>
|
||||||
public IObservable<CommitStatus> GetAll(string owner, string name, string reference)
|
public IObservable<CommitStatus> GetAll(string owner, string name, string reference)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
@@ -44,7 +50,7 @@ namespace Octokit.Reactive
|
|||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</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{CommitStatus}"/> of <see cref="CommitStatus"/>es representing commit statuses for specified repository</returns>
|
||||||
public IObservable<CommitStatus> GetAll(string owner, string name, string reference, ApiOptions options)
|
public IObservable<CommitStatus> GetAll(string owner, string name, string reference, ApiOptions options)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
@@ -63,9 +69,13 @@ 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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="IObservable{CombinedCommitStatus}"/> of <see cref="CombinedCommitStatus"/> representing combined commit status for specified repository</returns>
|
||||||
public IObservable<CombinedCommitStatus> GetCombined(string owner, string name, string reference)
|
public IObservable<CombinedCommitStatus> GetCombined(string owner, string name, string reference)
|
||||||
{
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
||||||
|
|
||||||
return _client.GetCombined(owner, name, reference).ToObservable();
|
return _client.GetCombined(owner, name, reference).ToObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,11 +85,16 @@ 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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <param name="commitStatus">The commit status to create</param>
|
/// <param name="newCommitStatus">The commit status to create</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="IObservable{CommitStatus}"/> of <see cref="CommitStatus"/> representing created commit status for specified repository</returns>
|
||||||
public IObservable<CommitStatus> Create(string owner, string name, string reference, NewCommitStatus commitStatus)
|
public IObservable<CommitStatus> Create(string owner, string name, string reference, NewCommitStatus newCommitStatus)
|
||||||
{
|
{
|
||||||
return _client.Create(owner, name, reference, commitStatus).ToObservable();
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
||||||
|
Ensure.ArgumentNotNull(newCommitStatus, "commitStatus");
|
||||||
|
|
||||||
|
return _client.Create(owner, name, reference, newCommitStatus).ToObservable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="IReadOnlyList{CommitStatus}"/> of <see cref="CommitStatus"/>es representing commit statuses for specified repository</returns>
|
||||||
public Task<IReadOnlyList<CommitStatus>> GetAll(string owner, string name, string reference)
|
public Task<IReadOnlyList<CommitStatus>> GetAll(string owner, string name, string reference)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
@@ -50,7 +50,7 @@ namespace Octokit
|
|||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</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{CommitStatus}"/> of <see cref="CommitStatus"/>es representing commit statuses for specified repository</returns>
|
||||||
public Task<IReadOnlyList<CommitStatus>> GetAll(string owner, string name, string reference, ApiOptions options)
|
public Task<IReadOnlyList<CommitStatus>> GetAll(string owner, string name, string reference, ApiOptions options)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
@@ -71,7 +71,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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="CombinedCommitStatus"/> representing combined commit status for specified repository</returns>
|
||||||
public Task<CombinedCommitStatus> GetCombined(string owner, string name, string reference)
|
public Task<CombinedCommitStatus> GetCombined(string owner, string name, string reference)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
@@ -90,16 +90,16 @@ 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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <param name="commitStatus">The commit status to create</param>
|
/// <param name="newCommitStatus">The commit status to create</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="CommitStatus"/> representing created commit status for specified repository</returns>
|
||||||
public Task<CommitStatus> Create(string owner, string name, string reference, NewCommitStatus commitStatus)
|
public Task<CommitStatus> Create(string owner, string name, string reference, NewCommitStatus newCommitStatus)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
|
||||||
Ensure.ArgumentNotNull(commitStatus, "commitStatus");
|
Ensure.ArgumentNotNull(newCommitStatus, "newCommitStatus");
|
||||||
|
|
||||||
return ApiConnection.Post<CommitStatus>(ApiUrls.CreateCommitStatus(owner, name, reference), commitStatus);
|
return ApiConnection.Post<CommitStatus>(ApiUrls.CreateCommitStatus(owner, name, reference), newCommitStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="IReadOnlyList{CommitStatus}"/> of <see cref="CommitStatus"/>es representing commit statuses for specified repository</returns>
|
||||||
Task<IReadOnlyList<CommitStatus>> GetAll(string owner, string name, string reference);
|
Task<IReadOnlyList<CommitStatus>> GetAll(string owner, string name, string reference);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -35,7 +35,7 @@ namespace Octokit
|
|||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</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{CommitStatus}"/> of <see cref="CommitStatus"/>es representing commit statuses for specified repository</returns>
|
||||||
Task<IReadOnlyList<CommitStatus>> GetAll(string owner, string name, string reference, ApiOptions options);
|
Task<IReadOnlyList<CommitStatus>> GetAll(string owner, string name, string reference, ApiOptions options);
|
||||||
|
|
||||||
/// <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="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="CombinedCommitStatus"/> representing combined commit status for specified repository</returns>
|
||||||
Task<CombinedCommitStatus> GetCombined(string owner, string name, string reference);
|
Task<CombinedCommitStatus> GetCombined(string owner, string name, string reference);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -60,8 +60,8 @@ 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 (SHA, branch name, or tag name) to list commits for</param>
|
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
|
||||||
/// <param name="commitStatus">The commit status to create</param>
|
/// <param name="newCommitStatus">The commit status to create</param>
|
||||||
/// <returns></returns>
|
/// <returns>A <see cref="CommitStatus"/> representing created commit status for specified repository</returns>
|
||||||
Task<CommitStatus> Create(string owner, string name, string reference, NewCommitStatus commitStatus);
|
Task<CommitStatus> Create(string owner, string name, string reference, NewCommitStatus newCommitStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user