using System.Collections.Generic; using System.Diagnostics; using System.Globalization; namespace Octokit { /// /// Used to create a new authorization. /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class NewAuthorization { // TODO: I'd love to not need this /// /// Initializes a new instance of the class. /// public NewAuthorization() { } /// /// Initializes a new instance of the class. /// /// The note. /// The scopes. public NewAuthorization(string note, IEnumerable scopes) { Scopes = scopes; Note = note; } /// /// Initializes a new instance of the class. /// /// The note. /// The scopes. /// The fingerprint. public NewAuthorization(string note, IEnumerable scopes, string fingerprint) { Scopes = scopes; Note = note; Fingerprint = fingerprint; } /// /// Replaces the authorization scopes with this list. /// public IEnumerable Scopes { get; set; } /// /// Optional parameter that allows an OAuth application to create multiple authorizations for a single user /// public string Fingerprint { get; set; } /// /// An optional note to remind you what the OAuth token is for. /// public string Note { get; set; } /// /// An optional URL to remind you what app the OAuth token is for. /// public string NoteUrl { get; set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Note: {0}", Note); } } } }