diff options
Diffstat (limited to 'src/ProtoGen/FieldGeneratorBase.cs')
-rw-r--r-- | src/ProtoGen/FieldGeneratorBase.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ProtoGen/FieldGeneratorBase.cs b/src/ProtoGen/FieldGeneratorBase.cs index 357614d1..f34d01cd 100644 --- a/src/ProtoGen/FieldGeneratorBase.cs +++ b/src/ProtoGen/FieldGeneratorBase.cs @@ -97,6 +97,12 @@ namespace Google.ProtocolBuffers.ProtoGen { } } + protected void AddClsComplianceCheck(TextGenerator writer) { + if (!Descriptor.IsCLSCompliant) { + writer.WriteLine("[global::System.CLSCompliant(false)]"); + } + } + /// <summary> /// For encodings with fixed sizes, returns that size in bytes. Otherwise /// returns -1. TODO(jonskeet): Make this less ugly. |