Skip to content

Commit 4cd3fd3

Browse files
committed
Improve some xmldocs
1 parent bf0ba2c commit 4cd3fd3

File tree

9 files changed

+19
-15
lines changed

9 files changed

+19
-15
lines changed

ValveKeyValue/ValveKeyValue/IIncludedFileLoader.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
namespace ValveKeyValue
22
{
33
/// <summary>
4-
/// Provides a way to open any file referenced with <c>#include</c> or <c>#base</c>.
4+
/// Provides a way to open any file referenced with <c>#include</c> or <c>#base</c> in a KV1 file.
5+
/// <c>#include</c> appends the included keys into the current block.
6+
/// <c>#base</c> loads a base file whose keys are recursively merged into the current file.
57
/// </summary>
68
public interface IIncludedFileLoader
79
{

ValveKeyValue/ValveKeyValue/KVDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
namespace ValveKeyValue
22
{
33
/// <summary>
4-
/// Represents a KeyValue document with a root name and header.
4+
/// Represents a KeyValue document with a root key name and an optional header.
55
/// </summary>
66
public class KVDocument : KVObject
77
{
88
/// <summary>
9-
/// Gets the header of this document containing encoding and format identifiers.
9+
/// Gets the header containing encoding and format identifiers, or <c>null</c> for KV1 documents.
1010
/// </summary>
1111
public KVHeader Header { get; }
1212

ValveKeyValue/ValveKeyValue/KVHeader.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ namespace ValveKeyValue
44
{
55
/// <summary>
66
/// Represents the header of a KeyValues3 document containing encoding and format identifiers.
7+
/// KV3 uses GUIDs instead of version integers to uniquely identify formats even across branched codebases.
78
/// </summary>
89
public class KVHeader
910
{
1011
/// <summary>
11-
/// Gets or sets the encoding identifier.
12+
/// Gets or sets the encoding identifier (e.g. text, binary, binary block-compressed).
1213
/// </summary>
1314
public KV3ID Encoding { get; set; }
1415

1516
/// <summary>
16-
/// Gets or sets the format identifier.
17+
/// Gets or sets the format identifier describing how the data should be interpreted.
1718
/// </summary>
1819
public KV3ID Format { get; set; }
1920
}

ValveKeyValue/ValveKeyValue/KVSerializationFormat.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public enum KVSerializationFormat
77
{
88
/// <summary>
99
/// KeyValues 1 textual format. Used often in Steam and the Source engine.
10+
/// Supports <c>#include</c>, <c>#base</c> directives and conditional expressions (e.g. <c>[$WIN32]</c>).
1011
/// </summary>
1112
KeyValues1Text,
1213

ValveKeyValue/ValveKeyValue/KVSerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace ValveKeyValue
1010
{
1111
/// <summary>
12-
/// Helper class to easily deserialize KeyValue objects.
12+
/// Helper class to serialize and deserialize KeyValue objects.
1313
/// </summary>
1414
public class KVSerializer
1515
{

ValveKeyValue/ValveKeyValue/KVSerializerOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace ValveKeyValue
44
{
55
/// <summary>
6-
/// Options to use when deserializing a KeyValues file.
6+
/// Options to use when serializing or deserializing a KeyValues file.
77
/// </summary>
88
public sealed class KVSerializerOptions
99
{

ValveKeyValue/ValveKeyValue/KVValueType.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ public enum KVValueType
1111
Null,
1212

1313
/// <summary>
14-
/// This <see cref="KVObject"/> represents a collection of child <see cref="KVObject"/>s.
14+
/// This <see cref="KVObject"/> represents a collection of named key-value pairs (like a dictionary or table).
1515
/// </summary>
1616
Collection,
1717

1818
/// <summary>
19-
/// This <see cref="KVObject"/> represents an array of child <see cref="KVObject"/>s.
19+
/// This <see cref="KVObject"/> represents an ordered array of unnamed child <see cref="KVObject"/>s.
2020
/// </summary>
2121
Array,
2222

2323
/// <summary>
24-
/// This <see cref="KVObject"/> represents a blob of binary bytes.
24+
/// This <see cref="KVObject"/> represents a binary blob (raw byte data).
2525
/// </summary>
2626
BinaryBlob,
2727

ValveKeyValue/ValveKeyValue/KeyValues3/Encoding.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ namespace ValveKeyValue.KeyValues3
55
/// </summary>
66
public static class Encoding
77
{
8-
/// <summary>Automatic binary encoding selection.</summary>
8+
/// <summary>Automatic binary encoding selection. Chooses the best binary encoding at write time.</summary>
99
public static Guid BinaryAuto { get; } = new(new byte[] { 0xE6, 0x09, 0xB1, 0x6E, 0x85, 0x6B, 0x83, 0x45, 0xA3, 0x12, 0x70, 0x3A, 0x6E, 0x04, 0x06, 0x8C });
1010

11-
/// <summary>Block-compressed binary encoding.</summary>
11+
/// <summary>Block-compressed binary encoding using Valve's custom LZ77-style block compression.</summary>
1212
public static Guid BinaryBlockCompressed { get; } = new(new byte[] { 0x46, 0x1A, 0x79, 0x95, 0xBC, 0x95, 0x6C, 0x4F, 0xA7, 0x0B, 0x05, 0xBC, 0xA1, 0xB7, 0xDF, 0xD2 });
1313

1414
/// <summary>LZ4-compressed binary encoding.</summary>
@@ -17,10 +17,10 @@ public static class Encoding
1717
/// <summary>Zstandard-compressed binary encoding.</summary>
1818
public static Guid BinaryZstd { get; } = new(new byte[] { 0x00, 0x0A, 0x62, 0x6F, 0xF0, 0xFE, 0x05, 0x43, 0xA3, 0x5F, 0x04, 0x23, 0x46, 0xB1, 0xDB, 0x29 });
1919

20-
/// <summary>Uncompressed binary encoding.</summary>
20+
/// <summary>Uncompressed binary encoding. Data is stored as-is with a string table and typed values.</summary>
2121
public static Guid Binary { get; } = new(new byte[] { 0x00, 0x05, 0x86, 0x1B, 0xD8, 0xF7, 0xC1, 0x40, 0xAD, 0x82, 0x75, 0xA4, 0x82, 0x67, 0xE7, 0x14 });
2222

23-
/// <summary>Text encoding.</summary>
23+
/// <summary>Human-readable text encoding with an XML-style comment header.</summary>
2424
public static Guid Text { get; } = new(new byte[] { 0x3C, 0x7F, 0x1C, 0xE2, 0x33, 0x8A, 0xC5, 0x41, 0x99, 0x77, 0xA7, 0x6D, 0x3A, 0x32, 0xAA, 0x0D });
2525
}
2626
}

ValveKeyValue/ValveKeyValue/KeyValues3/Format.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace ValveKeyValue.KeyValues3
55
/// </summary>
66
public static class Format
77
{
8-
/// <summary>Generic format.</summary>
8+
/// <summary>Generic format for arbitrary data, with no assumptions about how the data will be used.</summary>
99
public static Guid Generic { get; } = new(new byte[] { 0x7C, 0x16, 0x12, 0x74, 0xE9, 0x06, 0x98, 0x46, 0xAF, 0xF2, 0xE6, 0x3E, 0xB5, 0x90, 0x37, 0xE7 });
1010
}
1111
}

0 commit comments

Comments
 (0)