public string ToString(Cypher cypher) { if (cypher.Categories.ContainsValue(this)) { return(cypher.DecodePattern(new Pattern { this })); } else { var sb = new StringBuilder("?"); HasFeatures.ForEach(feature => sb.Append($"[+{feature.Name}]")); NotFeatures.ForEach(feature => sb.Append($"[+{feature.Name}]")); return(sb.ToString()); } }