public GrammarTag Add(GrammarStructure structure) { var childGrammarTag = new GrammarTag(structure); Append(childGrammarTag); _fixture.Policies.Tags(structure.Name).Each(tag => childGrammarTag.AddSafeClassName(tag)); return childGrammarTag; }
public bool IsMandatoryAutoSelectGrammar(GrammarStructure structure) { if (_policies.SelectionMode != SelectionMode.MandatoryAutoSelect) { return(false); } return(structure.Name == _policies.AutoSelectGrammarKey); }
public GrammarTag Add(GrammarStructure structure) { var grammarTag = new GrammarTag(structure); Child(grammarTag); _fixture.Policies.Tags(structure.Name).Each(tag => grammarTag.AddSafeClassName(tag)); return grammarTag; }
public GrammarTag(GrammarStructure grammar) : base("div") { _grammar = grammar; this.AddSafeClassName(grammar.Name); AddClass(GrammarConstants.STEP); MetaData(GrammarConstants.KEY, grammar.Name); }
void ITestVisitor.RunStep(IStep step) { if (isLatched) { return; } if (currentFixture.HasGrammar(step.GrammarKey)) { GrammarStructure grammar = currentFixture.GrammarFor(step.GrammarKey); grammar.AcceptVisitor(this, step); } else { _stream.InvalidGrammar(step.GrammarKey, step); } }
public void AddStructure(string grammarKey, GrammarStructure structure) { structure.Name = grammarKey; structure.Parent = this; _structures[grammarKey] = structure; }
private void writeGrammar(GrammarStructure grammar) { GrammarTag tag = Add(grammar); _grammarTags.Do(tag, () => grammar.AcceptVisitor(this, new Step())); if (Fixture.IsMandatoryAutoSelectGrammar(grammar)) return; if (_grammarTags.Count == 0) { tag.AddDeleteLink(); } }
private void writeGrammarErrors(HtmlTag ul, GrammarStructure grammar) { grammar.AllErrors().Each(x => ul.Add("li").Text("Grammar {0}: ".ToFormat(grammar.Name) + x.Message)); }
public bool IsMandatoryAutoSelectGrammar(GrammarStructure structure) { if (_policies.SelectionMode != SelectionMode.MandatoryAutoSelect) return false; return structure.Name == _policies.AutoSelectGrammarKey; }
private void writeGrammar(GrammarStructure grammar) { GrammarTag tag = Add(grammar); _grammarTags.Do(tag, () => grammar.AcceptVisitor(this, new Step())); }
public void AddStructure(GrammarStructure structure) { _children.Add(structure); }