public AmlSimpleEditorHelper() : base() { _foldingStrategy = new AmlFoldingStrategy() { ShowAttributesWhenFolded = true }; }
private string GetAttributeFoldText() { IEnumerable <KeyValuePair <string, string> > attrEnum = _attributes; if (this.Name == "Item") { attrEnum = _attributes.Where(a => a.Key == "type") .Concat(_attributes.Where(a => a.Key == "keyed_name")) .Concat(_attributes.Where(a => a.Key == "id")) .Concat(_attributes.Where(a => a.Key != "type" && a.Key != "keyed_name" && a.Key != "id").OrderBy(a => a.Key)); } var text = new StringBuilder(); var first = true; foreach (var kvp in attrEnum) { if (!first) { text.Append(' '); } text.Append(kvp.Key); text.Append("=\""); text.Append(AmlFoldingStrategy.XmlEncodeAttributeValue(kvp.Value, '\"')); text.Append('\"'); first = false; } return(text.ToString()); }