Add CLSCompliance.
diff --git a/src/ProtoGen/FieldGeneratorBase.cs b/src/ProtoGen/FieldGeneratorBase.cs
index 357614d..f34d01c 100644
--- a/src/ProtoGen/FieldGeneratorBase.cs
+++ b/src/ProtoGen/FieldGeneratorBase.cs
@@ -97,6 +97,12 @@
}
}
+ 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.