From b9fc037da40c456f1735a11b3a6b412b1e2fce0d Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 11 Feb 2024 11:42:27 +0200 Subject: [PATCH] Rename to KVDocument --- ValveKeyValue/ValveKeyValue.Test/Test Data/apisurface.txt | 6 +++--- ValveKeyValue/ValveKeyValue/{KVFile.cs => KVDocument.cs} | 4 ++-- ValveKeyValue/ValveKeyValue/KVSerializer.cs | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) rename ValveKeyValue/ValveKeyValue/{KVFile.cs => KVDocument.cs} (55%) diff --git a/ValveKeyValue/ValveKeyValue.Test/Test Data/apisurface.txt b/ValveKeyValue/ValveKeyValue.Test/Test Data/apisurface.txt index 45ccb132..3cee8b68 100644 --- a/ValveKeyValue/ValveKeyValue.Test/Test Data/apisurface.txt +++ b/ValveKeyValue/ValveKeyValue.Test/Test Data/apisurface.txt @@ -29,7 +29,7 @@ public class ValveKeyValue.KeyValueException public string ToString(); } -public class ValveKeyValue.KVFile +public class ValveKeyValue.KVDocument { public void Add(ValveKeyValue.KVObject value); public bool Equals(object obj); @@ -112,14 +112,14 @@ public sealed enum ValveKeyValue.KVSerializationFormat public class ValveKeyValue.KVSerializer { public static ValveKeyValue.KVSerializer Create(ValveKeyValue.KVSerializationFormat format); - public ValveKeyValue.KVFile Deserialize(System.IO.Stream stream, ValveKeyValue.KVSerializerOptions options); + public ValveKeyValue.KVDocument Deserialize(System.IO.Stream stream, ValveKeyValue.KVSerializerOptions options); public ValveKeyValue.TObject Deserialize(System.IO.Stream stream, ValveKeyValue.KVSerializerOptions options); public bool Equals(object obj); protected void Finalize(); public int GetHashCode(); public Type GetType(); protected object MemberwiseClone(); - public void Serialize(System.IO.Stream stream, ValveKeyValue.KVFile data, ValveKeyValue.KVSerializerOptions options); + public void Serialize(System.IO.Stream stream, ValveKeyValue.KVDocument data, ValveKeyValue.KVSerializerOptions options); public void Serialize(System.IO.Stream stream, ValveKeyValue.KVObject data, ValveKeyValue.KVSerializerOptions options); public void Serialize(System.IO.Stream stream, ValveKeyValue.TData data, string name, ValveKeyValue.KVSerializerOptions options); public string ToString(); diff --git a/ValveKeyValue/ValveKeyValue/KVFile.cs b/ValveKeyValue/ValveKeyValue/KVDocument.cs similarity index 55% rename from ValveKeyValue/ValveKeyValue/KVFile.cs rename to ValveKeyValue/ValveKeyValue/KVDocument.cs index 75dd4717..aebd995d 100644 --- a/ValveKeyValue/ValveKeyValue/KVFile.cs +++ b/ValveKeyValue/ValveKeyValue/KVDocument.cs @@ -1,8 +1,8 @@ namespace ValveKeyValue { - public class KVFile : KVObject + public class KVDocument : KVObject { - public KVFile(string name, KVValue value) : base(name, value) + public KVDocument(string name, KVValue value) : base(name, value) { // KV3 will require a header field that contains format/encoding here. } diff --git a/ValveKeyValue/ValveKeyValue/KVSerializer.cs b/ValveKeyValue/ValveKeyValue/KVSerializer.cs index 23e03a85..c4f4b882 100644 --- a/ValveKeyValue/ValveKeyValue/KVSerializer.cs +++ b/ValveKeyValue/ValveKeyValue/KVSerializer.cs @@ -30,8 +30,8 @@ public static KVSerializer Create(KVSerializationFormat format) /// /// The stream to deserialize from. /// Options to use that can influence the deserialization process. - /// A representing the KeyValues structure encoded in the stream. - public KVFile Deserialize(Stream stream, KVSerializerOptions options = null) + /// A representing the KeyValues structure encoded in the stream. + public KVDocument Deserialize(Stream stream, KVSerializerOptions options = null) { Require.NotNull(stream, nameof(stream)); var builder = new KVObjectBuilder(); @@ -42,7 +42,7 @@ public KVFile Deserialize(Stream stream, KVSerializerOptions options = null) } var root = builder.GetObject(); - return new KVFile(root.Name, root.Value); + return new KVDocument(root.Name, root.Value); } /// @@ -80,7 +80,7 @@ public void Serialize(Stream stream, KVObject data, KVSerializerOptions options /// The stream to serialize into. /// The data to serialize. /// Options to use that can influence the serialization process. - public void Serialize(Stream stream, KVFile data, KVSerializerOptions options = null) => + public void Serialize(Stream stream, KVDocument data, KVSerializerOptions options = null) => Serialize(stream, data, options); ///