using System;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
///
/// Represents the author or committer to a Git commit. This is the information stored in Git and should not be
/// confused with GitHub account information.
///
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class Committer
{
///
/// Initializes a new instance of the class.
///
public Committer() { }
///
/// Initializes a new instance of the class.
///
/// The full name of the author or committer.
/// The email.
/// The date.
public Committer(string name, string email, DateTimeOffset date)
{
Name = name;
Email = email;
Date = date;
}
///
/// Initializes a new instance of the class.
///
/// The GraphQL Node Id
/// The full name of the author or committer.
/// The email.
/// The date.
public Committer(string nodeId, string name, string email, DateTimeOffset date)
{
NodeId = nodeId;
Name = name;
Email = email;
Date = date;
}
///
/// GraphQL Node Id
///
public string NodeId { get; protected set; }
///
/// Gets the name of the author or committer.
///
///
/// The name.
///
public string Name { get; protected set; }
///
/// Gets the email of the author or committer.
///
///
/// The email.
///
public string Email { get; protected set; }
///
/// Gets the date of the author or contributor's contributions.
///
///
/// The date.
///
public DateTimeOffset Date { get; protected set; }
internal string DebuggerDisplay
{
get { return string.Format(CultureInfo.InvariantCulture, "Name: {0} Email: {1} Date: {2}", Name, Email, Date); }
}
}
}