blob: 2792648e7b54fc3abb7b113a6ed465daf05a5057 [file] [log] [blame]
csharptest35b68522011-05-20 12:22:21 -05001// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
csharptestf1816be2011-05-19 12:01:16 -05002
3using pb = global::Google.ProtocolBuffers;
4using pbc = global::Google.ProtocolBuffers.Collections;
5using pbd = global::Google.ProtocolBuffers.Descriptors;
6using scg = global::System.Collections.Generic;
7namespace Google.ProtocolBuffers.TestProtos {
8
csharptest445bdce2011-05-20 15:50:54 -05009 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
10 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
11 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
csharptestf1816be2011-05-19 12:01:16 -050012 public static partial class UnitTestGenericServices {
13
14 #region Extension registration
15 public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
16 }
17 #endregion
18 #region Static variables
19 #endregion
20 #region Descriptor
21 public static pbd::FileDescriptor Descriptor {
22 get { return descriptor; }
23 }
24 private static pbd::FileDescriptor descriptor;
25
26 static UnitTestGenericServices() {
27 byte[] descriptorData = global::System.Convert.FromBase64String(
28 "CiZleHRlc3QvdW5pdHRlc3RfZ2VuZXJpY19zZXJ2aWNlcy5wcm90bxIRcHJv" +
29 "dG9idWZfdW5pdHRlc3QaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBfb3B0aW9u" +
30 "cy5wcm90bxoeZ29vZ2xlL3Byb3RvYnVmL3VuaXR0ZXN0LnByb3RvGi1nb29n" +
31 "bGUvcHJvdG9idWYvdW5pdHRlc3RfY3VzdG9tX29wdGlvbnMucHJvdG8yoAEK" +
32 "ElRlc3RHZW5lcmljU2VydmljZRJECgNGb28SHS5wcm90b2J1Zl91bml0dGVz" +
33 "dC5Gb29SZXF1ZXN0Gh4ucHJvdG9idWZfdW5pdHRlc3QuRm9vUmVzcG9uc2US" +
34 "RAoDQmFyEh0ucHJvdG9idWZfdW5pdHRlc3QuQmFyUmVxdWVzdBoeLnByb3Rv" +
35 "YnVmX3VuaXR0ZXN0LkJhclJlc3BvbnNlMpUBCiNUZXN0R2VuZXJpY1NlcnZp" +
36 "Y2VXaXRoQ3VzdG9tT3B0aW9ucxJjCgNGb28SKS5wcm90b2J1Zl91bml0dGVz" +
37 "dC5DdXN0b21PcHRpb25Gb29SZXF1ZXN0GioucHJvdG9idWZfdW5pdHRlc3Qu" +
38 "Q3VzdG9tT3B0aW9uRm9vUmVzcG9uc2UiBeD6jB4CGgmQsose09uAy0lCREgB" +
39 "wj4/CiFHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MSF1VuaXRU" +
40 "ZXN0R2VuZXJpY1NlcnZpY2VziA4B");
41 pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
42 descriptor = root;
43 pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
44 RegisterAllExtensions(registry);
45 global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
46 global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RegisterAllExtensions(registry);
47 global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.RegisterAllExtensions(registry);
48 return registry;
49 };
50 pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
51 new pbd::FileDescriptor[] {
52 global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
53 global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor,
54 global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor,
55 }, assigner);
56 }
57 #endregion
58
59 }
60 #region Services
csharptest445bdce2011-05-20 15:50:54 -050061 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
62 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
63 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
csharptestf1816be2011-05-19 12:01:16 -050064 public abstract class TestGenericService : pb::IService {
65 public abstract void Foo(
66 pb::IRpcController controller,
67 global::Google.ProtocolBuffers.TestProtos.FooRequest request,
68 global::System.Action<global::Google.ProtocolBuffers.TestProtos.FooResponse> done);
69 public abstract void Bar(
70 pb::IRpcController controller,
71 global::Google.ProtocolBuffers.TestProtos.BarRequest request,
72 global::System.Action<global::Google.ProtocolBuffers.TestProtos.BarResponse> done);
73
74 public static pbd::ServiceDescriptor Descriptor {
75 get { return UnitTestGenericServices.Descriptor.Services[0]; }
76 }
77 public pbd::ServiceDescriptor DescriptorForType {
78 get { return Descriptor; }
79 }
80
81 public void CallMethod(
82 pbd::MethodDescriptor method,
83 pb::IRpcController controller,
84 pb::IMessage request,
85 global::System.Action<pb::IMessage> done) {
86 if (method.Service != Descriptor) {
87 throw new global::System.ArgumentException(
88 "Service.CallMethod() given method descriptor for wrong service type.");
89 }
90 switch(method.Index) {
91 case 0:
92 this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.FooRequest) request,
93 pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.FooResponse>(
94 done));
95 return;
96 case 1:
97 this.Bar(controller, (global::Google.ProtocolBuffers.TestProtos.BarRequest) request,
98 pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.BarResponse>(
99 done));
100 return;
101 default:
102 throw new global::System.InvalidOperationException("Can't get here.");
103 }
104 }
105
106 public pb::IMessage GetRequestPrototype(pbd::MethodDescriptor method) {
107 if (method.Service != Descriptor) {
108 throw new global::System.ArgumentException(
109 "Service.GetRequestPrototype() given method descriptor for wrong service type.");
110 }
111 switch(method.Index) {
112 case 0:
113 return global::Google.ProtocolBuffers.TestProtos.FooRequest.DefaultInstance;
114 case 1:
115 return global::Google.ProtocolBuffers.TestProtos.BarRequest.DefaultInstance;
116 default:
117 throw new global::System.InvalidOperationException("Can't get here.");
118 }
119 }
120
121 public pb::IMessage GetResponsePrototype(pbd::MethodDescriptor method) {
122 if (method.Service != Descriptor) {
123 throw new global::System.ArgumentException(
124 "Service.GetResponsePrototype() given method descriptor for wrong service type.");
125 }
126 switch(method.Index) {
127 case 0:
128 return global::Google.ProtocolBuffers.TestProtos.FooResponse.DefaultInstance;
129 case 1:
130 return global::Google.ProtocolBuffers.TestProtos.BarResponse.DefaultInstance;
131 default:
132 throw new global::System.InvalidOperationException("Can't get here.");
133 }
134 }
135
136 public static Stub CreateStub(pb::IRpcChannel channel) {
137 return new Stub(channel);
138 }
139
csharptest445bdce2011-05-20 15:50:54 -0500140 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
141 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
142 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
csharptestf1816be2011-05-19 12:01:16 -0500143 public class Stub : global::Google.ProtocolBuffers.TestProtos.TestGenericService {
144 internal Stub(pb::IRpcChannel channel) {
145 this.channel = channel;
146 }
147
148 private readonly pb::IRpcChannel channel;
149
150 public pb::IRpcChannel Channel {
151 get { return channel; }
152 }
153
154 public override void Foo(
155 pb::IRpcController controller,
156 global::Google.ProtocolBuffers.TestProtos.FooRequest request,
157 global::System.Action<global::Google.ProtocolBuffers.TestProtos.FooResponse> done) {
158 channel.CallMethod(Descriptor.Methods[0],
159 controller, request, global::Google.ProtocolBuffers.TestProtos.FooResponse.DefaultInstance,
160 pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.FooResponse, global::Google.ProtocolBuffers.TestProtos.FooResponse.Builder>(done, global::Google.ProtocolBuffers.TestProtos.FooResponse.DefaultInstance));
161 }
162
163 public override void Bar(
164 pb::IRpcController controller,
165 global::Google.ProtocolBuffers.TestProtos.BarRequest request,
166 global::System.Action<global::Google.ProtocolBuffers.TestProtos.BarResponse> done) {
167 channel.CallMethod(Descriptor.Methods[1],
168 controller, request, global::Google.ProtocolBuffers.TestProtos.BarResponse.DefaultInstance,
169 pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.BarResponse, global::Google.ProtocolBuffers.TestProtos.BarResponse.Builder>(done, global::Google.ProtocolBuffers.TestProtos.BarResponse.DefaultInstance));
170 }
171 }
172 }
csharptest445bdce2011-05-20 15:50:54 -0500173 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
174 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
175 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
csharptestf1816be2011-05-19 12:01:16 -0500176 public abstract class TestGenericServiceWithCustomOptions : pb::IService {
177 public abstract void Foo(
178 pb::IRpcController controller,
179 global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest request,
180 global::System.Action<global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse> done);
181
182 public static pbd::ServiceDescriptor Descriptor {
183 get { return UnitTestGenericServices.Descriptor.Services[1]; }
184 }
185 public pbd::ServiceDescriptor DescriptorForType {
186 get { return Descriptor; }
187 }
188
189 public void CallMethod(
190 pbd::MethodDescriptor method,
191 pb::IRpcController controller,
192 pb::IMessage request,
193 global::System.Action<pb::IMessage> done) {
194 if (method.Service != Descriptor) {
195 throw new global::System.ArgumentException(
196 "Service.CallMethod() given method descriptor for wrong service type.");
197 }
198 switch(method.Index) {
199 case 0:
200 this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest) request,
201 pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse>(
202 done));
203 return;
204 default:
205 throw new global::System.InvalidOperationException("Can't get here.");
206 }
207 }
208
209 public pb::IMessage GetRequestPrototype(pbd::MethodDescriptor method) {
210 if (method.Service != Descriptor) {
211 throw new global::System.ArgumentException(
212 "Service.GetRequestPrototype() given method descriptor for wrong service type.");
213 }
214 switch(method.Index) {
215 case 0:
216 return global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest.DefaultInstance;
217 default:
218 throw new global::System.InvalidOperationException("Can't get here.");
219 }
220 }
221
222 public pb::IMessage GetResponsePrototype(pbd::MethodDescriptor method) {
223 if (method.Service != Descriptor) {
224 throw new global::System.ArgumentException(
225 "Service.GetResponsePrototype() given method descriptor for wrong service type.");
226 }
227 switch(method.Index) {
228 case 0:
229 return global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.DefaultInstance;
230 default:
231 throw new global::System.InvalidOperationException("Can't get here.");
232 }
233 }
234
235 public static Stub CreateStub(pb::IRpcChannel channel) {
236 return new Stub(channel);
237 }
238
csharptest445bdce2011-05-20 15:50:54 -0500239 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
240 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
241 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
csharptestf1816be2011-05-19 12:01:16 -0500242 public class Stub : global::Google.ProtocolBuffers.TestProtos.TestGenericServiceWithCustomOptions {
243 internal Stub(pb::IRpcChannel channel) {
244 this.channel = channel;
245 }
246
247 private readonly pb::IRpcChannel channel;
248
249 public pb::IRpcChannel Channel {
250 get { return channel; }
251 }
252
253 public override void Foo(
254 pb::IRpcController controller,
255 global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest request,
256 global::System.Action<global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse> done) {
257 channel.CallMethod(Descriptor.Methods[0],
258 controller, request, global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.DefaultInstance,
259 pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse, global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.Builder>(done, global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.DefaultInstance));
260 }
261 }
262 }
263 #endregion
264
265}