public StrategyConfiguration(XmlNode xml) { if (xml.Attributes["stage"] != null) _stage = (BuilderStage)int.Parse(xml.Attributes["stage"].Value); if (xml.Attributes["library"] != null) _assembly = xml.Attributes["library"].Value; if (xml.Attributes["class"] != null) _startclass = xml.Attributes["class"].Value; if (xml.Attributes["checkreturn"] != null) _checkreturn = bool.Parse(xml.Attributes["checkreturn"].Value); }
public void RegisterStrategy(IBuilderStrategy strategy, BuilderStage stage) { strategies.Add(strategy, stage); }
public void RegisterStrategy <TStrategy>(BuilderStage stage) where TStrategy : IBuilderStrategy, new() { strategies.AddNew <TStrategy>(stage); }