Пример #1
0
 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);
 }
Пример #2
0
 public void RegisterStrategy(IBuilderStrategy strategy,
                              BuilderStage stage)
 {
     strategies.Add(strategy, stage);
 }
Пример #3
0
 public void RegisterStrategy <TStrategy>(BuilderStage stage)
     where TStrategy : IBuilderStrategy, new()
 {
     strategies.AddNew <TStrategy>(stage);
 }