Skip to content

Commit

Permalink
Add serialize overload that accepts KVFile
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Feb 11, 2024
1 parent 7eb8994 commit 78b2d60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions ValveKeyValue/ValveKeyValue.Test/Test Data/apisurface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public class ValveKeyValue.KVSerializer
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.KVObject data, ValveKeyValue.KVSerializerOptions options);
public void Serialize<ValveKeyValue.TData>(System.IO.Stream stream, ValveKeyValue.TData data, string name, ValveKeyValue.KVSerializerOptions options);
public string ToString();
Expand Down
9 changes: 9 additions & 0 deletions ValveKeyValue/ValveKeyValue/KVSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ public void Serialize(Stream stream, KVObject data, KVSerializerOptions options
visitor.Visit(data);
}

/// <summary>
/// Serializes a KeyValue object into stream.
/// </summary>
/// <param name="stream">The stream to serialize into.</param>
/// <param name="data">The data to serialize.</param>
/// <param name="options">Options to use that can influence the serialization process.</param>
public void Serialize(Stream stream, KVFile data, KVSerializerOptions options = null) =>
Serialize(stream, data, options);

/// <summary>
/// Serializes a KeyValue object into stream in plain text..
/// </summary>
Expand Down

0 comments on commit 78b2d60

Please sign in to comment.