blob: 8b5d97ee65f948678ad69179d29a69633c635c02 (
plain) (
tree)
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public abstract class ServiceWithNoOuter : pb::IService {
public abstract void Foo(
pb::IRpcController controller,
self::MessageWithNoOuter request,
global::System.Action<self::TestAllTypes> done);
public static pbd::ServiceDescriptor Descriptor {
get { return self::MultiFileProto.Descriptor.Services[0]; }
}
public pbd::ServiceDescriptor DescriptorForType {
get { return Descriptor; }
}
public void CallMethod(
pbd::MethodDescriptor method,
pb::IRpcController controller,
pb::IMessage request,
global::System.Action<pb::IMessage> done) {
if (method.Service != Descriptor) {
throw new global::System.ArgumentException(
"Service.CallMethod() given method descriptor for wrong " +
"service type.");
}
switch(method.Index) {
case 0:
this.Foo(controller, (self::MessageWithNoOuter)request,
pb::RpcUtil.SpecializeCallback<self::TestAllTypes>(
done));
return;
default:
throw new global::System.InvalidOperationException("Can't get here.");
}
}
public pb::IMessage GetRequestPrototype(pbd::MethodDescriptor method) {
if (method.Service != Descriptor) {
throw new global::System.ArgumentException(
"Service.GetRequestPrototype() given method " +
"descriptor for wrong service type.");
}
switch(method.Index) {
case 0:
return self::MessageWithNoOuter.DefaultInstance;
default:
throw new global::System.ArgumentException("Can't get here.");
}
}
public pb::IMessage GetResponsePrototype(pbd::MethodDescriptor method) {
if (method.Service != Descriptor) {
throw new global::System.ArgumentException(
"Service.GetResponsePrototype() given method " +
"descriptor for wrong service type.");
}
switch(method.Index) {
case 0:
return self::TestAllTypes.DefaultInstance;
default:
throw new global::System.ArgumentException("Can't get here.");
}
}
public static Stub CreateStub(
pb::IRpcChannel channel) {
return new Stub(channel);
}
public class Stub : self::ServiceWithNoOuter {
internal Stub(pb::IRpcChannel channel) {
this.channel = channel;
}
private readonly pb::IRpcChannel channel;
public pb::IRpcChannel Channel {
get { return channel; }
}
public override void Foo(
pb::IRpcController controller,
self::MessageWithNoOuter request,
global::System.Action<self::TestAllTypes> done) {
channel.CallMethod(
Descriptor.Methods[0],
controller,
request,
self::TestAllTypes.DefaultInstance,
pb::RpcUtil.GeneralizeCallback<self::TestAllTypes, self::TestAllTypes.Builder>(done, self::TestAllTypes.DefaultInstance));
}
}
}
}
|