Files
octokit.net/Octokit/Models/Request/NewSubscription.cs
Alexander Efremov bcf7b9af95 added new overloads
2016-06-13 15:32:30 +07:00

40 lines
1.5 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
/// <summary>
/// Used to watch a repository (subscribe to repository's notifications). Called by the
/// <see cref="IWatchedClient.WatchRepo(string,string,NewSubscription)"/> method.
/// </summary>
/// <remarks>
/// API: https://developer.github.com/v3/activity/watching/#set-a-repository-subscription
/// </remarks>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NewSubscription
{
/// <summary>
/// Determines if notifications should be received from this repository.
/// </summary>
/// <remarks>
/// If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications
/// made within a repository, set ignored to true. If you would like to stop watching a repository, delete the
/// repositorys subscription completely using the <see cref="IWatchedClient.UnwatchRepo(string,string)"/> method.
/// </remarks>
public bool Subscribed { get; set; }
/// <summary>
/// Determines if all notifications should be blocked from this repository.
/// </summary>
public bool Ignored { get; set; }
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored);
}
}
}
}