diff --git a/csharp/src/Google.Protobuf/Collections/MapField.cs b/csharp/src/Google.Protobuf/Collections/MapField.cs index 924743e5aff2..4865e50aef77 100644 --- a/csharp/src/Google.Protobuf/Collections/MapField.cs +++ b/csharp/src/Google.Protobuf/Collections/MapField.cs @@ -500,6 +500,7 @@ public void WriteTo(ref WriteContext ctx, Codec codec) WriteTo(ref ctx, codec, listToWrite); } + [SecuritySafeCritical] private void WriteTo(ref WriteContext ctx, Codec codec, IEnumerable> listKvp) { foreach (var entry in listKvp)