protected void writeAttributes(IEnumerable<KeyValue> attributes) { if (attributes != null) { foreach (var item in attributes) { this.writeString(item.Key); this.writeString(item.Value); } } }