using System.Diagnostics; using System.Globalization; namespace Octokit { /// /// Collection of feeds including both url and type /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class FeedLinks { public FeedLinks() { } public FeedLinks(FeedLink timeline, FeedLink user, FeedLink currentUserPublic, FeedLink currentUser, FeedLink currentUserActor, FeedLink currentUserOrganization) { Timeline = timeline; User = user; CurrentUserPublic = currentUserPublic; CurrentUser = currentUser; CurrentUserActor = currentUserActor; CurrentUserOrganization = currentUserOrganization; } /// /// The GitHub global public timeline /// public FeedLink Timeline { get; protected set; } /// /// The public timeline for any user, using URI template /// public FeedLink User { get; protected set; } /// /// The public timeline for the authenticated user /// public FeedLink CurrentUserPublic { get; protected set; } /// /// The private timeline for the authenticated user /// public FeedLink CurrentUser { get; protected set; } /// /// The private timeline for activity created by the authenticated user /// public FeedLink CurrentUserActor { get; protected set; } /// /// The private timeline for the authenticated user for a given organization, using URI template /// public FeedLink CurrentUserOrganization { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Timeline: {0}, User: {1}, CurrentUser: {2}", Timeline, User, CurrentUser); } } } /// /// Feed information including feed url and feed type /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class FeedLink { public FeedLink() { } public FeedLink(string href, string type) { Href = href; Type = type; } /// /// Link to feed /// public string Href { get; protected set; } /// /// Feed type, e.g. application/atom+xml /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] public string Type { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Type: {0}, Href: {1}", Type, Href); } } } }