public void WriteAttributeTo(TextWriter writer, string name, PositionTagged <string> start, PositionTagged <string> end, params AttributeValue[] args) { var totalArgWritten = 0; foreach (var attributeValue in args) { if (attributeValue.Value.Value == null) { continue; } totalArgWritten++; if (totalArgWritten == 1) { WriteLiteralTo(writer, start.Value); } WriteTo(writer, attributeValue.Prefix.Value); WriteTo(writer, attributeValue.Value.Value); } if (totalArgWritten > 0) { WriteLiteralTo(writer, end.Value); } }
protected void WriteAttribute(string name, PositionTagged <string> start, PositionTagged <string> end, params AttributeValue[] args) { var totalArgWritten = 0; foreach (var attributeValue in args) { if (attributeValue.Value.Value == null) { continue; } totalArgWritten++; if (totalArgWritten == 1) { WriteLiteral(start.Value); } Write(attributeValue.Prefix.Value); Write(attributeValue.Value.Value); } if (totalArgWritten > 0) { WriteLiteral(end.Value); } }
public override bool Equals(object obj) { PositionTagged <T> other = obj as PositionTagged <T>; return(other != null && other.Position == Position && Equals(other.Value, Value)); }
public AttributeValue(PositionTagged <string> prefix, PositionTagged <object> value, bool literal) { Prefix = prefix; Value = value; Literal = literal; }