void AttatchComments(TomlObject field, string comment) { if (comment != "") { field.ClearComments(); field.AddComment(comment); } }
protected void CreateDocumentation(TomlObject tomlObject) { var docs = tomlObject.Comments.Where(x => x.Text.StartsWith("#")).ToArray(); tomlObject.ClearComments(); if (!string.IsNullOrEmpty(Documentation)) { tomlObject.AddComment(Documentation); } if (docs.Length > 0) { tomlObject.AddComments(docs); } }