Skip to content

Commit

Permalink
Merge pull request #215 from stayintarkov/config-wipe-fix
Browse files Browse the repository at this point in the history
Potentially fix deserializer stoopidness
  • Loading branch information
Plootie authored Apr 27, 2024
2 parents 851c26b + e69ecb4 commit 865d088
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions SIT.Manager/Models/Aki/AkiCharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,33 @@
using System.Text.Json.Serialization;

namespace SIT.Manager.Models.Aki;
public class AkiCharacter(AkiServer parent, string username, string password) : ObservableObject
public class AkiCharacter : ObservableObject
{
[JsonPropertyName("Username")]
public string Username { get; init; } = username;
public string Username { get; init; }
[JsonPropertyName("Password")]
public string Password { get; init; } = password;
public string Password { get; init; }
[JsonPropertyName("ProfileID")]
public string ProfileID { get; internal set; } = "";
[JsonPropertyName("Edition")]
public string Edition { get; internal set; } = "Edge of Darkness";
[JsonIgnore]
public AkiServer ParentServer = parent;
public AkiServer ParentServer;

public AkiCharacter(AkiServer parent, string username, string password)
{
ParentServer = parent;
Username = username;
Password = password;
}

[JsonConstructor]
public AkiCharacter(AkiServer parentServer, string username, string password, string edition, string profileID)
{
this.ParentServer = parentServer;
this.Username = username;
this.Password = password;
this.Edition = edition;
this.ProfileID = profileID;
}
}

0 comments on commit 865d088

Please sign in to comment.