示例#1
0
 /// <summary>
 /// Retrieve a ruleset using a known short name.
 /// </summary>
 /// <param name="shortName">The ruleset's short name.</param>
 /// <returns>A ruleset, if available, else null.</returns>
 public RulesetInfo GetRuleset(string shortName) => AvailableRulesets.FirstOrDefault(r => r.ShortName == shortName);
示例#2
0
 /// <summary>
 /// Retrieve a ruleset using a known ID.
 /// </summary>
 /// <param name="id">The ruleset's internal ID.</param>
 /// <returns>A ruleset, if available, else null.</returns>
 public RulesetInfo GetRuleset(int id) => AvailableRulesets.FirstOrDefault(r => r.ID == id);