internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds) { // Create the children elements IItem item = parent as IItem; if (item != null) { CreateChildrenElements(elementFactory, item, rule, ruleIds); } else { if (parent == rule) { CreateChildrenElements(elementFactory, rule, ruleIds); } else { System.Diagnostics.Debug.Assert(false); } } // Create the tag element at the end only if there were some children IPropertyTag tag = elementFactory.CreatePropertyTag(parent); tag.NameValue(parent, null, _value); return(tag); }
private IPropertyTag ParseNameValueTag(SrgsNameValueTag srgsTag, IElement parent) { IPropertyTag propertyTag = _parser.CreatePropertyTag(parent); propertyTag.NameValue(parent, srgsTag.Name, srgsTag.Value); propertyTag.PostParse(parent); return(propertyTag); }
internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds) { IItem item = parent as IItem; if (item != null) { CreateChildrenElements(elementFactory, item, rule, ruleIds); } else if (parent == rule) { CreateChildrenElements(elementFactory, rule, ruleIds); } IPropertyTag propertyTag = elementFactory.CreatePropertyTag(parent); propertyTag.NameValue(parent, null, _value); return(propertyTag); }