aboutsummaryrefslogtreecommitdiff
path: root/src/ProtoGen/ServiceInterfaceGenerator.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2012-10-14 11:55:10 -0500
committerrogerk <devnull@localhost>2012-10-14 11:55:10 -0500
commit14e011f61ba2f5976f287e67f4ad82e0cdc546cd (patch)
tree4cd4d2056f763261af13161e72d0845c9b530b5f /src/ProtoGen/ServiceInterfaceGenerator.cs
parent7d53c1291202b1b503fb611829514e17fdef053b (diff)
downloadprotobuf-14e011f61ba2f5976f287e67f4ad82e0cdc546cd.tar.gz
protobuf-14e011f61ba2f5976f287e67f4ad82e0cdc546cd.tar.bz2
protobuf-14e011f61ba2f5976f287e67f4ad82e0cdc546cd.zip
Add generated_code_attributes option, defaulted to false to generate the CompilerGeneratedAttribute and GeneratedCodeAttribute attributes
Diffstat (limited to 'src/ProtoGen/ServiceInterfaceGenerator.cs')
-rw-r--r--src/ProtoGen/ServiceInterfaceGenerator.cs16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/ProtoGen/ServiceInterfaceGenerator.cs b/src/ProtoGen/ServiceInterfaceGenerator.cs
index 64b6d69b..11e3d3d0 100644
--- a/src/ProtoGen/ServiceInterfaceGenerator.cs
+++ b/src/ProtoGen/ServiceInterfaceGenerator.cs
@@ -104,9 +104,7 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine("[global::System.Runtime.InteropServices.GuidAttribute(\"{0}\")]",
new Guid(options.InterfaceId));
}
- writer.WriteLine("[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]");
- writer.WriteLine("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{0}\", \"{1}\")]",
- GetType().Assembly.GetName().Name, GetType().Assembly.GetName().Version);
+ WriteGeneratedCodeAttributes(writer);
writer.WriteLine("{0} partial interface I{1} {{", ClassAccessLevel, Descriptor.Name);
writer.Indent();
@@ -147,9 +145,7 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine("[global::System.CLSCompliant(false)]");
}
writer.WriteLine("[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]");
- writer.WriteLine("[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]");
- writer.WriteLine("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{0}\", \"{1}\")]",
- GetType().Assembly.GetName().Name, GetType().Assembly.GetName().Version);
+ WriteGeneratedCodeAttributes(writer);
writer.WriteLine("{0} partial class {1} : I{1}, pb::IRpcDispatch, global::System.IDisposable {{",
ClassAccessLevel, Descriptor.Name);
writer.Indent();
@@ -196,9 +192,7 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine("[global::System.CLSCompliant(false)]");
}
writer.WriteLine("[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]");
- writer.WriteLine("[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]");
- writer.WriteLine("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{0}\", \"{1}\")]",
- GetType().Assembly.GetName().Name, GetType().Assembly.GetName().Version);
+ WriteGeneratedCodeAttributes(writer);
writer.WriteLine("public partial class Dispatch : pb::IRpcDispatch, global::System.IDisposable {");
writer.Indent();
writer.WriteLine("private readonly bool dispose;");
@@ -248,9 +242,7 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine("[global::System.CLSCompliant(false)]");
}
writer.WriteLine("[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]");
- writer.WriteLine("[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]");
- writer.WriteLine("[global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"{0}\", \"{1}\")]",
- GetType().Assembly.GetName().Name, GetType().Assembly.GetName().Version);
+ WriteGeneratedCodeAttributes(writer);
writer.WriteLine(
"public partial class ServerStub : pb::IRpcServerStub, global::System.IDisposable {");
writer.Indent();