aboutsummaryrefslogtreecommitdiff
path: root/src/ProtoGen
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProtoGen')
-rw-r--r--src/ProtoGen/UmbrellaClassGenerator.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ProtoGen/UmbrellaClassGenerator.cs b/src/ProtoGen/UmbrellaClassGenerator.cs
index d41e70eb..9dcbcab9 100644
--- a/src/ProtoGen/UmbrellaClassGenerator.cs
+++ b/src/ProtoGen/UmbrellaClassGenerator.cs
@@ -115,8 +115,10 @@ namespace Google.ProtocolBuffers.ProtoGen {
writer.WriteLine("namespace {0} {{", Descriptor.CSharpOptions.Namespace);
writer.Indent();
writer.WriteLine();
+ }
+ if (Descriptor.CSharpOptions.CodeContracts) {
+ writer.WriteLine("[global::System.Diagnostics.Contracts.ContractVerificationAttribute(false)]");
}
-
writer.WriteLine("{0} static partial class {1} {{", ClassAccessLevel, Descriptor.CSharpOptions.UmbrellaClassname);
writer.WriteLine();
writer.Indent();