using System.Diagnostics; using System.Globalization; using Octokit.Internal; namespace Octokit { [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Blob { public Blob() { } public Blob(string nodeId, string content, EncodingType encoding, string sha, int size) { NodeId = nodeId; Content = content; Encoding = encoding; Sha = sha; Size = size; } /// /// GraphQL Node Id /// public string NodeId { get; protected set; } /// /// The content of the blob. /// public string Content { get; protected set; } /// /// The encoding of the blob. /// public StringEnum Encoding { get; protected set; } /// /// The SHA of the blob. /// public string Sha { get; protected set; } /// /// The size of the blob. /// public int Size { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Sha: {0} Size: {1}", Sha, Size); } } } public enum EncodingType { [Parameter(Value = "utf-8")] Utf8, [Parameter(Value = "base64")] Base64 } }