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