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