using System; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; namespace Octokit { /// /// An entry in the activity event stream /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Activity { public Activity() { } public Activity(string type, bool @public, Repository repo, User actor, Organization org, DateTimeOffset createdAt, string id) { Type = type; Public = @public; Repo = repo; Actor = actor; Org = org; CreatedAt = createdAt; Id = id; } /// /// The type of the activity. /// [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] public string Type { get; protected set; } /// /// Whether the activity event is public or not. /// public bool Public { get; protected set; } /// /// The repository associated with the activity event. /// public Repository Repo { get; protected set; } /// /// The user associated with the activity event. /// public User Actor { get; protected set; } /// /// The organization associated with the activity event. /// public Organization Org { get; protected set; } /// /// The date the activity event was created. /// public DateTimeOffset CreatedAt { get; protected set; } /// /// The activity event Id. /// public string Id { get; protected set; } /// /// The payload associated with the activity event. /// public ActivityPayload Payload { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Type: {0}", Type); } } } }