Add comments

This commit is contained in:
Andrei Zavatski 2019-08-27 15:36:08 +03:00
parent f49b58c102
commit ed827d514f
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ public class APIKudosuHistory
[JsonProperty("amount")]
private int amount
{
//We can receive negative values. However "action" is enough to build needed items
set => Amount = Math.Abs(value);
}
@ -49,6 +50,7 @@ private string action
{
set
{
//We will receive something like "foo.bar" or just "foo"
string parsed = value.Contains(".") ? value.Split('.')[0].Pascalize() + value.Split('.')[1].Pascalize() : value.Pascalize();
Action = (KudosuAction)Enum.Parse(typeof(KudosuAction), parsed);