diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 19:01:53 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 19:01:53 -0400 |
commit | 0c5fa1180949a28ec0c5e2e17df669c1b7c4dbef (patch) | |
tree | 113b44f267630804d0b0c3408800733290b5331f /src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs | |
parent | 8e0ddd1d00e3d0d11fbaa0ffce804b3e7186c254 (diff) | |
parent | ee0ff5687d4002aab20cd91fd28d007d916af36c (diff) | |
download | SMAPI-0c5fa1180949a28ec0c5e2e17df669c1b7c4dbef.tar.gz SMAPI-0c5fa1180949a28ec0c5e2e17df669c1b7c4dbef.tar.bz2 SMAPI-0c5fa1180949a28ec0c5e2e17df669c1b7c4dbef.zip |
Merge branch 'json-validator' into develop
Diffstat (limited to 'src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs')
-rw-r--r-- | src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs new file mode 100644 index 00000000..f9497a38 --- /dev/null +++ b/src/SMAPI.Web/ViewModels/JsonValidator/JsonValidatorErrorModel.cs @@ -0,0 +1,36 @@ +namespace StardewModdingAPI.Web.ViewModels.JsonValidator +{ + /// <summary>The view model for a JSON validator error.</summary> + public class JsonValidatorErrorModel + { + /********* + ** Accessors + *********/ + /// <summary>The line number on which the error occurred.</summary> + public int Line { get; set; } + + /// <summary>The field path in the JSON file where the error occurred.</summary> + public string Path { get; set; } + + /// <summary>A human-readable description of the error.</summary> + public string Message { get; set; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + public JsonValidatorErrorModel() { } + + /// <summary>Construct an instance.</summary> + /// <param name="line">The line number on which the error occurred.</param> + /// <param name="path">The field path in the JSON file where the error occurred.</param> + /// <param name="message">A human-readable description of the error.</param> + public JsonValidatorErrorModel(int line, string path, string message) + { + this.Line = line; + this.Path = path; + this.Message = message; + } + } +} |