using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; namespace Octokit { public enum PagesBuildStatus { /// /// The site has yet to be built /// Null, /// /// The build is in progress /// Building, /// /// The site has been built /// Built, /// /// An error occurred during the build /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Errored")] Errored } /// /// Information about your GitHub Pages configuration /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Page { public Page() { } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "cname")] public Page(string url, PagesBuildStatus status, string cname, bool custom404) { Url = url; Status = status; CName = cname; Custom404 = custom404; } /// /// The pages's API URL. /// public string Url { get; protected set; } /// /// Build status of the pages site. /// public PagesBuildStatus Status { get; protected set; } /// /// CName of the pages site. Will be null if no CName was provided by the user. /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "CName")] public string CName { get; protected set; } /// /// Is a custom 404 page provided. /// public bool Custom404 { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "CName: {0}, Status: {1}", CName, Status.ToString()); } } } }