summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/GitHub/GitRepo.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-01 18:16:09 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-01 18:16:09 -0400
commitc8ad50dad1d706a1901798f9396f6becfea36c0e (patch)
tree28bd818a5db39ec5ece1bd141a28de955950463b /src/SMAPI.Web/Framework/Clients/GitHub/GitRepo.cs
parent451b70953ff4c0b1b27ae0de203ad99379b45b2a (diff)
parentf78093bdb58d477b400cde3f19b70ffd6ddf833d (diff)
downloadSMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.gz
SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.bz2
SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/Framework/Clients/GitHub/GitRepo.cs')
-rw-r--r--src/SMAPI.Web/Framework/Clients/GitHub/GitRepo.cs24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/GitHub/GitRepo.cs b/src/SMAPI.Web/Framework/Clients/GitHub/GitRepo.cs
index 7d80576e..879b5e49 100644
--- a/src/SMAPI.Web/Framework/Clients/GitHub/GitRepo.cs
+++ b/src/SMAPI.Web/Framework/Clients/GitHub/GitRepo.cs
@@ -5,16 +5,34 @@ namespace StardewModdingAPI.Web.Framework.Clients.GitHub
/// <summary>Basic metadata about a GitHub project.</summary>
internal class GitRepo
{
+ /*********
+ ** Accessors
+ *********/
/// <summary>The full repository name, including the owner.</summary>
[JsonProperty("full_name")]
- public string FullName { get; set; }
+ public string FullName { get; }
/// <summary>The URL to the repository web page, if any.</summary>
[JsonProperty("html_url")]
- public string WebUrl { get; set; }
+ public string? WebUrl { get; }
/// <summary>The code license, if any.</summary>
[JsonProperty("license")]
- public GitLicense License { get; set; }
+ public GitLicense? License { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="fullName">The full repository name, including the owner.</param>
+ /// <param name="webUrl">The URL to the repository web page, if any.</param>
+ /// <param name="license">The code license, if any.</param>
+ public GitRepo(string fullName, string? webUrl, GitLicense? license)
+ {
+ this.FullName = fullName;
+ this.WebUrl = webUrl;
+ this.License = license;
+ }
}
}