finish get-character implementation

This commit is contained in:
2024-06-11 14:13:04 +02:00
parent 60b38e5434
commit ca8cee9189
5 changed files with 42 additions and 2 deletions

View File

@@ -221,4 +221,18 @@ public class JsonFileDataProvider : IDataProvider
return jcharacter.Owner;
return null;
}
public IEnumerable<Character>? GetCharacters(Group group)
{
if (group is JsonGroup jgroup)
return jgroup.Characters;
return null;
}
public IEnumerable<Character>? GetCharacters(UserProfile profile)
{
if (profile is UserProfile jprofile)
return JsonFile.Characters.Where(n => n.Owner == profile);
return null;
}
}