Skip to content

Commit 17edcc7

Browse files
committed
Make root name nullable
1 parent f4d5250 commit 17edcc7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ValveKeyValue/ValveKeyValue.Console/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static int Execute(
4141
return 0;
4242
}
4343

44-
static void RecursivePrint(string name, KVObject obj, int indent = 0)
44+
static void RecursivePrint(string? name, KVObject obj, int indent = 0)
4545
{
4646
Console.Write(new string('\t', indent));
4747

ValveKeyValue/ValveKeyValue/KVDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ public class KVDocument : KVObject
1313
/// <summary>
1414
/// Gets the root key name of this document.
1515
/// </summary>
16-
public string Name { get; }
16+
public string? Name { get; }
1717

1818
/// <summary>
1919
/// Initializes a new instance of the <see cref="KVDocument"/> class.
2020
/// </summary>
2121
/// <param name="header">Header of the document.</param>
2222
/// <param name="name">Root key name of the document.</param>
2323
/// <param name="root">Root value of the document.</param>
24-
public KVDocument(KVHeader header, string name, KVObject root)
24+
public KVDocument(KVHeader header, string? name, KVObject root)
2525
: base(root.ValueType, root._scalar, root._ref, root.Flag)
2626
{
2727
Header = header;

0 commit comments

Comments
 (0)