// testing Markov Rules, to start // had to make changes to the Markov Generator. // but now we can serialize/deserialize // plus, some names make a tiny bit more sense // I'm rethinking the whole "MarkovRuleType" necessity. // it's almos all params EXCEPT for the XrayWord type -- that has words and puncts as tokens. // can that be done with a regex? public void TestRuleSerialization() { // List<ITransformer> globalRules //// THIS WORKS //var l = new Leet(); //var lx = l.ToXml(); //var ll = new Leet().FromXML(lx); // THIS does NOT work var tf = new TransformationFactory(Granularity.Word); var rules = tf.GetTransformers(); // cannot deserialize Leet.... var rx = rules.ToXml(); var rr = new List <TransformerBase>().FromXML(rx); }
public RuleSetEditor(TransformationFactory fac, MultipleSelectionControl control, List <RuleSet> activeRuleSetEditors) : this(control, activeRuleSetEditors) { RuleSet = new RuleSet(fac.Granularity); RuleSet.Rules = fac.GetTransformers(); }