diff --git a/src/Tomlyn/Syntax/SyntaxNodeExtensions.cs b/src/Tomlyn/Syntax/SyntaxNodeExtensions.cs index 56c3d28..5fa9dc6 100644 --- a/src/Tomlyn/Syntax/SyntaxNodeExtensions.cs +++ b/src/Tomlyn/Syntax/SyntaxNodeExtensions.cs @@ -43,13 +43,19 @@ public static void Add(this SyntaxList list, string name, int[] if (list == null) throw new ArgumentNullException(nameof(list)); list.Add(new KeyValueSyntax(name, new ArraySyntax(values))); } - + public static void Add(this SyntaxList list, string name, string[] values) { if (list == null) throw new ArgumentNullException(nameof(list)); list.Add(new KeyValueSyntax(name, new ArraySyntax(values))); } + public static void Add(this SyntaxList list, string name, DateTimeValueSyntax value) + { + if (list == null) throw new ArgumentNullException(nameof(list)); + list.Add(new KeyValueSyntax(name, value)); + } + public static KeyValueSyntax AddComment(this KeyValueSyntax keyValue, string comment) { if (keyValue == null) throw new ArgumentNullException(nameof(keyValue)); @@ -96,4 +102,4 @@ public static T AddComment(this T node, string comment) where T : SyntaxNode return node; } } -} \ No newline at end of file +}