From b7ef3c860375baea7b5db95940519ce0746b6ecc Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 1 Oct 2018 22:20:36 +0200 Subject: added Command Response Handling --- DSACore/Models/Database/DatabaseChar.cs | 16 ++++++++++++++++ DSACore/Models/Database/GeneralSpell.cs | 4 ++++ DSACore/Models/Database/Talent.cs | 9 +++++++++ 3 files changed, 29 insertions(+) (limited to 'DSACore/Models/Database') diff --git a/DSACore/Models/Database/DatabaseChar.cs b/DSACore/Models/Database/DatabaseChar.cs index 03383b8..9cd865f 100644 --- a/DSACore/Models/Database/DatabaseChar.cs +++ b/DSACore/Models/Database/DatabaseChar.cs @@ -8,6 +8,22 @@ namespace DSACore.Models.Database { public class DatabaseChar { + public DatabaseChar() + { + } + + public DatabaseChar(int id, string name, string rasse, List skills, List talents, List advantages, List spells, List weaponTalents) + { + Id = id; + Name = name ?? throw new ArgumentNullException(nameof(name)); + Rasse = rasse ?? throw new ArgumentNullException(nameof(rasse)); + Skills = skills ?? throw new ArgumentNullException(nameof(skills)); + Talents = talents ?? throw new ArgumentNullException(nameof(talents)); + Advantages = advantages ?? throw new ArgumentNullException(nameof(advantages)); + Spells = spells ?? throw new ArgumentNullException(nameof(spells)); + WeaponTalents = weaponTalents ?? throw new ArgumentNullException(nameof(weaponTalents)); + } + public int Id { get; set; } public string Name { get; set; } diff --git a/DSACore/Models/Database/GeneralSpell.cs b/DSACore/Models/Database/GeneralSpell.cs index 6a6e94c..f53081e 100644 --- a/DSACore/Models/Database/GeneralSpell.cs +++ b/DSACore/Models/Database/GeneralSpell.cs @@ -17,5 +17,9 @@ namespace DSACore.Models.Database public GeneralSpell(string name, string roll) : base(name, roll) { } + + public GeneralSpell() + { + } } } diff --git a/DSACore/Models/Database/Talent.cs b/DSACore/Models/Database/Talent.cs index 117d0f7..aca65a4 100644 --- a/DSACore/Models/Database/Talent.cs +++ b/DSACore/Models/Database/Talent.cs @@ -7,6 +7,15 @@ namespace DSACore.Models.Database { public class Talent { + public Talent() + { + } + + public Talent(string name) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + } + public Talent(string name, String roll) { Name = name ?? throw new ArgumentNullException(nameof(name)); -- cgit v1.2.3-70-g09d2