using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace Octokit
{
///
/// A users email
///
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class EmailAddress
{
public EmailAddress() { }
public EmailAddress(string email, bool verified, bool primary)
{
Email = email;
Verified = verified;
Primary = primary;
}
///
/// The email address
///
public string Email { get; protected set; }
///
/// true if the email is verified; otherwise false
///
public bool Verified { get; protected set; }
///
/// true if this is the users primary email; otherwise false
///
public bool Primary { get; protected set; }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode",
Justification = "Used by DebuggerDisplayAttribute")]
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture,
"EmailAddress: Email: {0}; Primary: {1}, Verified: {2}", Email, Primary, Verified);
}
}
}
}