aboutsummaryrefslogtreecommitdiff
path: root/src/ProtoGen/ServiceInterfaceGenerator.cs
diff options
context:
space:
mode:
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();