static CommonReflectedTypeInfo() { RuleManagerType = typeof(RuleManager); if (RuleManagerType == null) { return; } RuleManagerInstanceField = RuleManagerType.GetField("instance", BindingFlags.NonPublic | BindingFlags.Static); GenerateRulesMethod = RuleManagerType.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Instance); CurrentRulesProperty = RuleManagerType.GetProperty("CurrentRules", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); WireRuleSetGenerator = new WireRuleGenerator(); WhosOnFirstRuleSetGenerator = new WhosOnFirstRuleSetGenerator(); MemoryRuleSetGenerator = new MemoryRuleSetGenerator(); KeypadRuleSetGenerator = new KeypadRuleSetGenerator(); NeedyKnobRuleSetGenerator = new NeedyKnobRuleSetGenerator(); ButtonRuleSetGenerator = new ButtonRuleGenerator(); WireSequenceRuleSetGenerator = new WireSetRuleGenerator(); PasswordRuleSetGenerator = new PasswordRuleGenerator(); //MorseCodeRuleSetGenerator = new MorseCodeRuleSetGenerator(); MorseCodeRuleSetGenerator = new MorseCodeRuleGenerator(); VennWireRuleSetGenerator = new VennWireGenerator(); RhythmHeavenRuleSetGenerator = new RhythmHeavenRuleSetGenerator(); MazeRuleSetGenerator = new MazeRuleSetGenerator(); SimonRuleSetGenerator = new SimonRuleGenerator(); Seed = -1; OriginalBombRules = null; BombComponentLogger = typeof(BombComponent).GetField("logger", BindingFlags.NonPublic | BindingFlags.Instance); MorseCodeModuleChosenTermField = typeof(MorseCodeComponent).GetField("chosenTerm", BindingFlags.NonPublic | BindingFlags.Instance); MorseCodeModuleChosenWordField = typeof(MorseCodeComponent).GetField("chosenWord", BindingFlags.NonPublic | BindingFlags.Instance); }
protected RuleManager() { WireRuleSetGenerator = new WireRuleGenerator(); WhosOnFirstRuleSetGenerator = new WhosOnFirstRuleSetGenerator(); MemoryRuleSetGenerator = new MemoryRuleSetGenerator(); KeypadRuleSetGenerator = new KeypadRuleSetGenerator(); NeedyKnobRuleSetGenerator = new NeedyKnobRuleSetGenerator(); ButtonRuleSetGenerator = new ButtonRuleGenerator(); WireSequenceRuleSetGenerator = new WireSequenceRuleSetGenerator(); PasswordRuleSetGenerator = new PasswordRuleGenerator(); MorseCodeRuleSetGenerater = new MorseCodeRuleGenerator(); VennWireRuleSetGenerator = new VennWireGenerator(); MazeRuleSetGenerator = new MazeRuleSetGenerator(); SimonRuleSetGenerator = new SimonRuleGenerator(); }