From c06812b0b2e9f8a3e019033991fe7ea7a2056bfc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 8 Jun 2020 17:13:15 +0200 Subject: [PATCH] address a few TODOs --- csharp/src/Google.Protobuf.Test/FieldCodecTest.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs b/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs index c6c389d1db..7f366926fa 100644 --- a/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs +++ b/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs @@ -124,11 +124,10 @@ namespace Google.Protobuf { var stream = new MemoryStream(); var codedOutput = new CodedOutputStream(stream); - - // TODO: simplify WriteContext.Initialize(codedOutput, out WriteContext ctx); try { + // only write the value using the codec codec.ValueWriter(ref ctx, sampleValue); } finally @@ -186,11 +185,10 @@ namespace Google.Protobuf if (codec.DefaultValue != null) // This part isn't appropriate for message types. { codedOutput = new CodedOutputStream(stream); - - // TODO: simplify WriteContext.Initialize(codedOutput, out WriteContext ctx); try { + // only write the value using the codec codec.ValueWriter(ref ctx, codec.DefaultValue); } finally