From c9a981807580a3c08d1289614d8f9ad6e8e9d84c Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Mon, 2 Sep 2019 18:05:33 -0500 Subject: [PATCH] Update proto2.md Reworded info about message initialization --- docs/csharp/proto2.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/csharp/proto2.md b/docs/csharp/proto2.md index da63f86519..27ad2f96f3 100644 --- a/docs/csharp/proto2.md +++ b/docs/csharp/proto2.md @@ -97,10 +97,9 @@ foo.GetOrInitializeExtension(RepeatedFooExt).Add(new Baz()); ### Message initialization -Initialization refers to the status of required fields in a proto2 message. If a message is uninitialized, not all required fields are set in either the message itself or any of its submessages. Checking message initialization is not handled automatically by the library, but can be done manually via the -`IsInitialized` extension method in `MessageExtensions`. Please note, parsers and input streams don't check messages -for initialization on their own and throw errors. Instead it's up to you to handle messages with missing required fields -in whatever way you see fit. +Initialization refers to checking the status of required fields in a proto2 message. If a message is uninitialized, not all required fields are set in either the message itself or any of its submessages. In other languages, missing required fields throw errors depending on the merge method used. This could cause unforseen errors at runtime if the incorrect method is used. +However, in this implementation, parsers and input streams don't check messages for initialization on their own and throw errors. Instead it's up to you to handle messages with missing required fields in whatever way you see fit. +Checking message initialization can be done manually via the `IsInitialized` extension method in `MessageExtensions`. ### Extension registries