/// <summary> /// Deserializes a KeyValue object from a stream. /// </summary> /// <param name="stream">The stream to deserialize from.</param> /// <param name="options">Options to use that can influence the deserialization process.</param> /// <returns>A <see cref="KvObject"/> representing the KeyValues structure encoded in the stream.</returns> public KvObject Deserialize(Stream stream, KvSerializerOptions options = null) { Require.NotNull(stream, nameof(stream)); var builder = new KvObjectBuilder(); using (var reader = MakeReader(stream, builder, options ?? KvSerializerOptions.DefaultOptions)) reader.ReadObject(); return(builder.GetObject()); }
public KvAppendingObjectBuilder(KvObjectBuilder originalBuilder) { Require.NotNull(originalBuilder, nameof(originalBuilder)); _originalBuilder = originalBuilder; }