Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TemplateAction"/> class.
 /// </summary>
 /// <param name="actionType">Type of the action.</param>
 /// <param name="source">The source.</param>
 /// <param name="target">The target.</param>
 public TemplateAction(TemplateRule parent, string actionType, string source, string target)
     : this(parent)
 {
     this.ActionType = actionType;
     this.Source     = source;
     this.Target     = target;
 }
Пример #2
0
 /// <summary>
 /// Loads the rules.
 /// </summary>
 /// <param name="document">The document.</param>
 private void LoadRules(XmlDocument document, string path)
 {
     foreach (XmlNode node in document.SelectNodes("template/rules/rule"))
     {
         NodeAttributes attributes = new NodeAttributes(node);
         TemplateRule   rule       = new TemplateRule(this, attributes.AsString("iterator"), attributes.AsString("condition"));
         rule.LoadActions(node, path);
         this.Rules.Add(rule);
     }
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TemplateAction"/> class.
 /// </summary>
 public TemplateAction(TemplateRule parent)
 {
     this.Parent = parent;
 }
Пример #4
0
 /// <summary>
 /// Loads the rules.
 /// </summary>
 /// <param name="document">The document.</param>
 private void LoadRules(XmlDocument document, string path)
 {
     foreach (XmlNode node in document.SelectNodes("template/rules/rule"))
     {
         NodeAttributes attributes = new NodeAttributes(node);
         TemplateRule rule = new TemplateRule(this, attributes.AsString("iterator"), attributes.AsString("condition"));
         rule.LoadActions(node, path);
         this.Rules.Add(rule);
     }
 }