-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using LorisAngel.Common.Objects; | ||
|
||
namespace LorisAngel.Common | ||
{ | ||
public class Badges | ||
{ | ||
public static LoriBadge[] AllBadges = { | ||
new LoriBadge(0, "founder", "Founder", "This user was here from the start"), | ||
new LoriBadge(1, "dev", "Developer", "This user helped develop Lori's Angel"), | ||
}; | ||
|
||
public static LoriBadge GetBadge(int id) | ||
{ | ||
if (id >= 0 && id < AllBadges.Length) return AllBadges[id]; | ||
else return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
namespace LorisAngel.Common.Objects | ||
using System; | ||
|
||
namespace LorisAngel.Common.Objects | ||
{ | ||
public class LoriBadge | ||
{ | ||
public int Id { get; set; } | ||
public string DisplayName { get; set; } | ||
public string Code { get; set; } | ||
public string Description { get; set; } | ||
|
||
public LoriBadge(int id, string displayName, string code, string description) | ||
{ | ||
Id = id; | ||
DisplayName = displayName ?? throw new ArgumentNullException(nameof(displayName)); | ||
Code = code ?? throw new ArgumentNullException(nameof(code)); | ||
Description = description ?? throw new ArgumentNullException(nameof(description)); | ||
} | ||
} | ||
} |