Commit efed509b authored by csharptest's avatar csharptest Committed by rogerk

Fixed two errors caused by incorrect merge of the rpc interface generator

parent da4989c4
...@@ -216,8 +216,8 @@ namespace Google.ProtocolBuffers.ProtoGen ...@@ -216,8 +216,8 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine( writer.WriteLine(
"public TMessage CallMethod<TMessage, TBuilder>(string methodName, pb::IMessageLite request, pb::IBuilderLite<TMessage, TBuilder> response)"); "public TMessage CallMethod<TMessage, TBuilder>(string methodName, pb::IMessageLite request, pb::IBuilderLite<TMessage, TBuilder> response)");
writer.WriteLine(" where TMessage : IMessageLite<TMessage, TBuilder>"); writer.WriteLine(" where TMessage : pb::IMessageLite<TMessage, TBuilder>");
writer.WriteLine(" where TBuilder : IBuilderLite<TMessage, TBuilder> {"); writer.WriteLine(" where TBuilder : pb::IBuilderLite<TMessage, TBuilder> {");
writer.Indent(); writer.Indent();
writer.WriteLine("switch(methodName) {"); writer.WriteLine("switch(methodName) {");
writer.Indent(); writer.Indent();
...@@ -230,7 +230,7 @@ namespace Google.ProtocolBuffers.ProtoGen ...@@ -230,7 +230,7 @@ namespace Google.ProtocolBuffers.ProtoGen
GetClassName(method.InputType)); GetClassName(method.InputType));
} }
writer.WriteLine( writer.WriteLine(
"default: throw new global::System.MissingMethodException(typeof(ISearchService).FullName, methodName);"); "default: throw new global::System.MissingMethodException(typeof(I{0}).FullName, methodName);", Descriptor.Name);
writer.Outdent(); writer.Outdent();
writer.WriteLine("}"); //end switch writer.WriteLine("}"); //end switch
writer.Outdent(); writer.Outdent();
...@@ -287,7 +287,7 @@ namespace Google.ProtocolBuffers.ProtoGen ...@@ -287,7 +287,7 @@ namespace Google.ProtocolBuffers.ProtoGen
method.Name, GetClassName(method.InputType), GetClassName(method.OutputType)); method.Name, GetClassName(method.InputType), GetClassName(method.OutputType));
} }
writer.WriteLine( writer.WriteLine(
"default: throw new global::System.MissingMethodException(typeof(ISearchService).FullName, methodName);"); "default: throw new global::System.MissingMethodException(typeof(I{0}).FullName, methodName);", Descriptor.Name);
writer.Outdent(); writer.Outdent();
writer.WriteLine("}"); //end switch writer.WriteLine("}"); //end switch
writer.Outdent(); writer.Outdent();
......
...@@ -1208,8 +1208,8 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1208,8 +1208,8 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public TMessage CallMethod<TMessage, TBuilder>(string methodName, pb::IMessageLite request, pb::IBuilderLite<TMessage, TBuilder> response) public TMessage CallMethod<TMessage, TBuilder>(string methodName, pb::IMessageLite request, pb::IBuilderLite<TMessage, TBuilder> response)
where TMessage : IMessageLite<TMessage, TBuilder> where TMessage : pb::IMessageLite<TMessage, TBuilder>
where TBuilder : IBuilderLite<TMessage, TBuilder> { where TBuilder : pb::IBuilderLite<TMessage, TBuilder> {
switch(methodName) { switch(methodName) {
case "Search": return response.MergeFrom(implementation.Search((global::Google.ProtocolBuffers.TestProtos.SearchRequest)request)).Build(); case "Search": return response.MergeFrom(implementation.Search((global::Google.ProtocolBuffers.TestProtos.SearchRequest)request)).Build();
case "RefineSearch": return response.MergeFrom(implementation.RefineSearch((global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest)request)).Build(); case "RefineSearch": return response.MergeFrom(implementation.RefineSearch((global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest)request)).Build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment