public OptionSystem() { // // TODO: 在此处添加构造函数逻辑 // option = new Option(); optionRules = new OptionRules(); }
internal override void ValidateOption(int commandLevel) { OptionRules.PropertyMappingIsSet(this, commandLevel); OptionRules.MappedPropertyIsWritable(this, commandLevel); OptionRules.OnProcessCallbackNotAllowedForBoolOptions(this, commandLevel); }
public void CheckIfSingleChoiceSelectedWithRule(ICollection <EventOption> options, OptionRules rule) { if (options.Any(op => op.Rule == rule) && options.Count > 1) { throw new EventException(PremiumErrorCodes.EventChoiceCanBeSingleOnly); } }