public override void AfterVisit(AttributeNode attributeNode) { if (_propertyValueEmitter == null) _propertyValueEmitter = EmitterNode.Lambda<VPropertyValue>((d, r) => null); var valueEmitter = _propertyValueEmitter; _properties.Peek().Add(EmitterNode.AsList(EmitterNode.Lambda((d, r) => new VProperty(attributeNode.Name, valueEmitter.Execute(d, r))))); _propertyValueEmitter = null; }
public static void AssertAttribute(AttributeNode expected, AttributeNode actual) { Assert.Equal(expected.Name, actual.Name); if (expected.Value == null) Assert.Null(actual.Value); AssertAttributeContent(expected.Value, actual.Value); }
public virtual void AfterVisit(AttributeNode attributeNode) { }
public virtual bool BeforeVisit(AttributeNode attributeNode) { return false; }
public override bool BeforeVisit(AttributeNode attributeNode) { return true; }
public void AfterVisit(AttributeNode attributeNode) { var scope = _scopes.Pop(); Action<TextWriter, IDataContext, IRenderingContext> a = (w, d, rc) => { foreach (var element in scope.Elements) { element(w, d, rc); } }; var parentScope = _scopes.Peek(); parentScope.Attributes.Add(new Tuple<Action<TextWriter, IDataContext, IRenderingContext>, Action<TextWriter, IDataContext, IRenderingContext>>((w, d, r) => w.Write(attributeNode.Name), a)); }
public bool BeforeVisit(AttributeNode attributeNode) { _scopes.Push(new Scope()); return true; }