From 68d831e3a48ea3a81b3791a24219bc3406b962b8 Mon Sep 17 00:00:00 2001 From: csharptest Date: Tue, 3 May 2011 13:47:34 -0500 Subject: Implementation of service interface generator --- .hgignore | 3 + build/build.csproj | 5 + protos/extest/unittest_rpc_interop.proto | 34 + protos/google/protobuf/csharp_options.proto | 176 +-- src/ProtoGen/Generator.cs | 3 +- src/ProtoGen/ProtoGen.csproj | 239 ++-- src/ProtoGen/ServiceGenerator.cs | 8 +- src/ProtoGen/ServiceInterfaceGenerator.cs | 235 ++++ .../ProtocolBuffers.Test.csproj | 270 ++--- .../TestProtos/UnitTestRpcInterop.cs | 1212 ++++++++++++++++++++ src/ProtocolBuffers.Test/TestRpcGenerator.cs | 153 +++ .../DescriptorProtos/CSharpOptions.cs | 535 ++++++++- src/ProtocolBuffers/IRpcDispatch.cs | 53 + src/ProtocolBuffers/ProtocolBuffers.csproj | 411 +++---- src/ProtocolBuffers2008.sln | 335 +++--- 15 files changed, 2960 insertions(+), 712 deletions(-) create mode 100644 protos/extest/unittest_rpc_interop.proto create mode 100644 src/ProtoGen/ServiceInterfaceGenerator.cs create mode 100644 src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs create mode 100644 src/ProtocolBuffers.Test/TestRpcGenerator.cs create mode 100644 src/ProtocolBuffers/IRpcDispatch.cs diff --git a/.hgignore b/.hgignore index cc96fb4f..7cb03c57 100644 --- a/.hgignore +++ b/.hgignore @@ -3,3 +3,6 @@ glob:build_temp/ glob:bin/ glob:obj/ glob:*.cache +glob:*.suo +glob:*.user +glob:_ReSharper* diff --git a/build/build.csproj b/build/build.csproj index a3f342e6..efc69c14 100644 --- a/build/build.csproj +++ b/build/build.csproj @@ -38,6 +38,7 @@ + @@ -97,6 +98,9 @@ $(SourceDirectory)\ProtocolBuffers.Test\TestProtos + + $(SourceDirectory)\ProtocolBuffers.Test\TestProtos + $(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos @@ -145,6 +149,7 @@ + diff --git a/protos/extest/unittest_rpc_interop.proto b/protos/extest/unittest_rpc_interop.proto new file mode 100644 index 00000000..4c9f3289 --- /dev/null +++ b/protos/extest/unittest_rpc_interop.proto @@ -0,0 +1,34 @@ +// Additional options required for C# generation. File from copyright +// line onwards is as per original distribution. +import "google/protobuf/csharp_options.proto"; +option (google.protobuf.csharp_file_options).namespace = "Google.ProtocolBuffers.TestProtos"; +option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestRpcInterop"; + +option (google.protobuf.csharp_file_options).service_generator_type = IRPCDISPATCH; + +option optimize_for = SPEED; + +message SearchRequest { + repeated string Criteria = 1; +} + +message SearchResponse { + message ResultItem { + required string url = 1; + optional string name = 2; + } + + repeated ResultItem results = 1; +} + +message RefineSearchRequest { + repeated string Criteria = 1; + required SearchResponse previous_results = 2; +} + +service SearchService { + option (google.protobuf.csharp_service_options).interface_id = "{A65F0925-FD11-4f94-B166-89AC4F027205}"; + rpc Search (SearchRequest) returns (SearchResponse) { option (google.protobuf.csharp_method_options).dispatch_id = 5; }; + + rpc RefineSearch (RefineSearchRequest) returns (SearchResponse); +} diff --git a/protos/google/protobuf/csharp_options.proto b/protos/google/protobuf/csharp_options.proto index 1d2ff2b8..d9fe04e1 100644 --- a/protos/google/protobuf/csharp_options.proto +++ b/protos/google/protobuf/csharp_options.proto @@ -1,73 +1,103 @@ -// Extra options for C# generator - -import "google/protobuf/descriptor.proto"; - -package google.protobuf; - -message CSharpFileOptions { - - // Namespace for generated classes; defaults to the package. - optional string namespace = 1; - - // Name of the "umbrella" class used for metadata about all - // the messages within this file. Default is based on the name - // of the file. - optional string umbrella_classname = 2; - - // Whether classes should be public (true) or internal (false) - optional bool public_classes = 3 [default = true]; - - // Whether to generate a single file for everything within the - // .proto file (false), or one file per message (true). - // This option is not currently honored; please log a feature - // request if you really want it. - optional bool multiple_files = 4; - - // Whether to nest messages within a single umbrella class (true) - // or create the umbrella class as a peer, with messages as - // top-level classes in the namespace (false) - optional bool nest_classes = 5; - - // Generate appropriate support for Code Contracts - // (Ongoing; support should improve over time) - optional bool code_contracts = 6; - - // Create subdirectories for namespaces, e.g. namespace "Foo.Bar" - // would generate files within [output directory]/Foo/Bar - optional bool expand_namespace_directories = 7; - - // Generate attributes indicating non-CLS-compliance - optional bool cls_compliance = 8 [default = true]; - - // The extension that should be appended to the umbrella_classname when creating files. - optional string file_extension = 221 [default = ".cs"]; - - // A nested namespace for the umbrella class. Helpful for name collisions caused by - // umbrella_classname conflicting with an existing type. This will be automatically - // set to 'Proto' if a collision is detected with types being generated. This value - // is ignored when nest_classes == true - optional string umbrella_namespace = 222; - - // The output path for the source file(s) generated - optional string output_directory = 223 [default = "."]; - - // Will ignore the type generations and remove dependencies for the descriptor proto - // files that declare their package to be "google.protobuf" - optional bool ignore_google_protobuf = 224 [default = false]; -} - -extend FileOptions { - optional CSharpFileOptions csharp_file_options = 1000; -} - -extend FieldOptions { - optional CSharpFieldOptions csharp_field_options = 1000; -} - -message CSharpFieldOptions { - // Provides the ability to override the name of the property - // generated for this field. This is applied to all properties - // and methods to do with this field, including HasFoo, FooCount, - // FooList etc. - optional string property_name = 1; -} +// Extra options for C# generator + +import "google/protobuf/descriptor.proto"; + +package google.protobuf; + +message CSharpFileOptions { + + // Namespace for generated classes; defaults to the package. + optional string namespace = 1; + + // Name of the "umbrella" class used for metadata about all + // the messages within this file. Default is based on the name + // of the file. + optional string umbrella_classname = 2; + + // Whether classes should be public (true) or internal (false) + optional bool public_classes = 3 [default = true]; + + // Whether to generate a single file for everything within the + // .proto file (false), or one file per message (true). + // This option is not currently honored; please log a feature + // request if you really want it. + optional bool multiple_files = 4; + + // Whether to nest messages within a single umbrella class (true) + // or create the umbrella class as a peer, with messages as + // top-level classes in the namespace (false) + optional bool nest_classes = 5; + + // Generate appropriate support for Code Contracts + // (Ongoing; support should improve over time) + optional bool code_contracts = 6; + + // Create subdirectories for namespaces, e.g. namespace "Foo.Bar" + // would generate files within [output directory]/Foo/Bar + optional bool expand_namespace_directories = 7; + + // Generate attributes indicating non-CLS-compliance + optional bool cls_compliance = 8 [default = true]; + + // The extension that should be appended to the umbrella_classname when creating files. + optional string file_extension = 221 [default = ".cs"]; + + // A nested namespace for the umbrella class. Helpful for name collisions caused by + // umbrella_classname conflicting with an existing type. This will be automatically + // set to 'Proto' if a collision is detected with types being generated. This value + // is ignored when nest_classes == true + optional string umbrella_namespace = 222; + + // The output path for the source file(s) generated + optional string output_directory = 223 [default = "."]; + + // Will ignore the type generations and remove dependencies for the descriptor proto + // files that declare their package to be "google.protobuf" + optional bool ignore_google_protobuf = 224 [default = false]; + + // Controls how services are generated, GENERIC is the deprecated original implementation + // INTERFACE generates service interfaces only, RPCINTEROP generates interfaces and + // implementations using the included Windows RPC interop libarary. + optional CSharpServiceType service_generator_type = 225 [default = GENERIC]; +} + +enum CSharpServiceType { + // Generates the original Java generic service implementations + GENERIC = 1; + // Generates an interface for the service and nothing else + INTERFACE = 2; + // Generates an interface for the service and client/server wrappers for the interface + IRPCDISPATCH = 3; +} + +extend FileOptions { + optional CSharpFileOptions csharp_file_options = 1000; +} + +extend FieldOptions { + optional CSharpFieldOptions csharp_field_options = 1000; +} + +message CSharpFieldOptions { + // Provides the ability to override the name of the property + // generated for this field. This is applied to all properties + // and methods to do with this field, including HasFoo, FooCount, + // FooList etc. + optional string property_name = 1; +} + +message CSharpServiceOptions { + optional string interface_id = 1; +} + +extend ServiceOptions { + optional CSharpServiceOptions csharp_service_options = 1000; +} + +message CSharpMethodOptions { + optional int32 dispatch_id = 1; +} + +extend MethodOptions { + optional CSharpMethodOptions csharp_method_options = 1000; +} \ No newline at end of file diff --git a/src/ProtoGen/Generator.cs b/src/ProtoGen/Generator.cs index fd73591f..8b5c2cfb 100644 --- a/src/ProtoGen/Generator.cs +++ b/src/ProtoGen/Generator.cs @@ -63,8 +63,7 @@ namespace Google.ProtocolBuffers.ProtoGen { List descriptorProtos = new List(); foreach (string inputFile in options.InputFiles) { ExtensionRegistry extensionRegistry = ExtensionRegistry.CreateInstance(); - extensionRegistry.Add(CSharpOptions.CSharpFileOptions); - extensionRegistry.Add(CSharpOptions.CSharpFieldOptions); + CSharpOptions.RegisterAllExtensions(extensionRegistry); using (Stream inputStream = File.OpenRead(inputFile)) { descriptorProtos.Add(FileDescriptorSet.ParseFrom(inputStream, extensionRegistry)); } diff --git a/src/ProtoGen/ProtoGen.csproj b/src/ProtoGen/ProtoGen.csproj index e771d055..c8b61453 100644 --- a/src/ProtoGen/ProtoGen.csproj +++ b/src/ProtoGen/ProtoGen.csproj @@ -1,126 +1,127 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {250ADE34-82FD-4BAE-86D5-985FBE589C4A} - Exe - Properties - Google.ProtocolBuffers.ProtoGen - ProtoGen - v2.0 - 512 - true - Properties\Google.ProtocolBuffers.ProtoGen.snk - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - Google.ProtocolBuffers.ProtoGen.ProgramPreprocess - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {6908BDCE-D925-43F3-94AC-A531E6DF2591} - ProtocolBuffers - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {250ADE34-82FD-4BAE-86D5-985FBE589C4A} + Exe + Properties + Google.ProtocolBuffers.ProtoGen + ProtoGen + v2.0 + 512 + true + Properties\Google.ProtocolBuffers.ProtoGen.snk + + + + + 3.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + Google.ProtocolBuffers.ProtoGen.ProgramPreprocess + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {6908BDCE-D925-43F3-94AC-A531E6DF2591} + ProtocolBuffers + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + --> \ No newline at end of file diff --git a/src/ProtoGen/ServiceGenerator.cs b/src/ProtoGen/ServiceGenerator.cs index 03d2f120..3c70b9ce 100644 --- a/src/ProtoGen/ServiceGenerator.cs +++ b/src/ProtoGen/ServiceGenerator.cs @@ -35,14 +35,14 @@ using Google.ProtocolBuffers.Descriptors; namespace Google.ProtocolBuffers.ProtoGen { - internal class ServiceGenerator : SourceGeneratorBase, ISourceGenerator { + internal class GenericServiceGenerator : SourceGeneratorBase, ISourceGenerator { private enum RequestOrResponse { Request, Response - } - - internal ServiceGenerator(ServiceDescriptor descriptor) + } + + internal GenericServiceGenerator(ServiceDescriptor descriptor) : base(descriptor) { } diff --git a/src/ProtoGen/ServiceInterfaceGenerator.cs b/src/ProtoGen/ServiceInterfaceGenerator.cs new file mode 100644 index 00000000..4aa8ffaa --- /dev/null +++ b/src/ProtoGen/ServiceInterfaceGenerator.cs @@ -0,0 +1,235 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// http://github.com/jskeet/dotnet-protobufs/ +// Original C++/Java/Python code: +// http://code.google.com/p/protobuf/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using Google.ProtocolBuffers.DescriptorProtos; +using Google.ProtocolBuffers.Descriptors; + +namespace Google.ProtocolBuffers.ProtoGen { + internal class ServiceGenerator : SourceGeneratorBase, ISourceGenerator { + + readonly CSharpServiceType svcType; + ISourceGenerator _generator; + + internal ServiceGenerator(ServiceDescriptor descriptor) + : base(descriptor) { + svcType = descriptor.File.CSharpOptions.ServiceGeneratorType; + switch (svcType) { + case CSharpServiceType.GENERIC: + _generator = new GenericServiceGenerator(descriptor); + break; + case CSharpServiceType.INTERFACE: + _generator = new ServiceInterfaceGenerator(descriptor); + break; + case CSharpServiceType.IRPCDISPATCH: + _generator = new RpcServiceGenerator(descriptor); + break; + default: throw new ApplicationException("Unknown ServiceGeneratorType = " + svcType.ToString()); + } + } + + public void Generate(TextGenerator writer) { + _generator.Generate(writer); + } + + class ServiceInterfaceGenerator : SourceGeneratorBase, ISourceGenerator { + + public ServiceInterfaceGenerator(ServiceDescriptor descriptor) + : base(descriptor) { + } + + public virtual void Generate(TextGenerator writer) { + + CSharpServiceOptions options = Descriptor.Options.GetExtension(CSharpOptions.CsharpServiceOptions); + if (options != null && options.HasInterfaceId) { + writer.WriteLine("[global::System.Runtime.InteropServices.GuidAttribute(\"{0}\")]", new Guid(options.InterfaceId)); + } + writer.WriteLine("{0} partial interface I{1} {{", ClassAccessLevel, Descriptor.Name); + writer.Indent(); + + foreach (MethodDescriptor method in Descriptor.Methods) + { + CSharpMethodOptions mth = method.Options.GetExtension(CSharpOptions.CsharpMethodOptions); + if(mth.HasDispatchId) { + writer.WriteLine("[global::System.Runtime.InteropServices.DispId({0})]", mth.DispatchId); + } + writer.WriteLine("{0} {1}({2} {3});", GetClassName(method.OutputType), NameHelpers.UnderscoresToPascalCase(method.Name), GetClassName(method.InputType), NameHelpers.UnderscoresToCamelCase(method.InputType.Name)); + } + + writer.Outdent(); + writer.WriteLine("}"); + } + } + + class RpcServiceGenerator : ServiceInterfaceGenerator { + + public RpcServiceGenerator(ServiceDescriptor descriptor) + : base(descriptor) { + } + + public override void Generate(TextGenerator writer) + { + base.Generate(writer); + + writer.WriteLine(); + + // CLIENT Proxy + { + if (Descriptor.File.CSharpOptions.ClsCompliance) + writer.WriteLine("[global::System.CLSCompliant(false)]"); + writer.WriteLine("{0} partial class {1} : I{1}, pb::IRpcDispatch, global::System.IDisposable {{", ClassAccessLevel, Descriptor.Name); + writer.Indent(); + writer.WriteLine("private readonly bool dispose;"); + writer.WriteLine("private readonly pb::IRpcDispatch dispatch;"); + + writer.WriteLine("public {0}(pb::IRpcDispatch dispatch) : this(dispatch, true) {{", Descriptor.Name); + writer.WriteLine("}"); + writer.WriteLine("public {0}(pb::IRpcDispatch dispatch, bool dispose) {{", Descriptor.Name); + writer.WriteLine(" if (null == (this.dispatch = dispatch)) throw new global::System.ArgumentNullException();"); + writer.WriteLine(" this.dispose = dispose && dispatch is global::System.IDisposable;"); + writer.WriteLine("}"); + writer.WriteLine(); + + writer.WriteLine("public void Dispose() {"); + writer.WriteLine(" if (dispose) ((global::System.IDisposable)dispatch).Dispose();"); + writer.WriteLine("}"); + writer.WriteLine(); + writer.WriteLine("TMessage pb::IRpcDispatch.CallMethod(string method, pb::IMessageLite request, pb::IBuilderLite response) {"); + writer.WriteLine(" return dispatch.CallMethod(method, request, response);"); + writer.WriteLine("}"); + writer.WriteLine(); + + foreach (MethodDescriptor method in Descriptor.Methods) { + writer.WriteLine("public {0} {1}({2} {3}) {{", GetClassName(method.OutputType), NameHelpers.UnderscoresToPascalCase(method.Name), GetClassName(method.InputType), NameHelpers.UnderscoresToCamelCase(method.InputType.Name)); + writer.WriteLine(" return dispatch.CallMethod(\"{0}\", {1}, {2}.CreateBuilder());", + method.Name, + NameHelpers.UnderscoresToCamelCase(method.InputType.Name), + GetClassName(method.OutputType) + ); + writer.WriteLine("}"); + writer.WriteLine(); + } + } + // SERVER - DISPATCH + { + if (Descriptor.File.CSharpOptions.ClsCompliance) + writer.WriteLine("[global::System.CLSCompliant(false)]"); + writer.WriteLine("public partial class Dispatch : pb::IRpcDispatch, global::System.IDisposable {"); + writer.Indent(); + writer.WriteLine("private readonly bool dispose;"); + writer.WriteLine("private readonly I{0} implementation;", Descriptor.Name); + + writer.WriteLine("public Dispatch(I{0} implementation) : this(implementation, true) {{", Descriptor.Name); + writer.WriteLine("}"); + writer.WriteLine("public Dispatch(I{0} implementation, bool dispose) {{", Descriptor.Name); + writer.WriteLine(" if (null == (this.implementation = implementation)) throw new global::System.ArgumentNullException();"); + writer.WriteLine(" this.dispose = dispose && implementation is global::System.IDisposable;"); + writer.WriteLine("}"); + writer.WriteLine(); + + writer.WriteLine("public void Dispose() {"); + writer.WriteLine(" if (dispose) ((global::System.IDisposable)implementation).Dispose();"); + writer.WriteLine("}"); + writer.WriteLine(); + + writer.WriteLine("public TMessage CallMethod(string methodName, pb::IMessageLite request, pb::IBuilderLite response)"); + writer.WriteLine(" where TMessage : IMessageLite"); + writer.WriteLine(" where TBuilder : IBuilderLite {"); + writer.Indent(); + writer.WriteLine("switch(methodName) {"); + writer.Indent(); + + foreach (MethodDescriptor method in Descriptor.Methods) { + writer.WriteLine("case \"{0}\": return response.MergeFrom(implementation.{1}(({2})request)).Build();", method.Name, NameHelpers.UnderscoresToPascalCase(method.Name), GetClassName(method.InputType)); + } + writer.WriteLine("default: throw new global::System.MissingMethodException(typeof(ISearchService).FullName, methodName);"); + writer.Outdent(); + writer.WriteLine("}");//end switch + writer.Outdent(); + writer.WriteLine("}");//end invoke + writer.Outdent(); + writer.WriteLine("}");//end server + } + // SERVER - STUB + { + if (Descriptor.File.CSharpOptions.ClsCompliance) + writer.WriteLine("[global::System.CLSCompliant(false)]"); + writer.WriteLine("public partial class ServerStub : pb::IRpcServerStub, global::System.IDisposable {"); + writer.Indent(); + writer.WriteLine("private readonly bool dispose;"); + writer.WriteLine("private readonly pb::IRpcDispatch implementation;", Descriptor.Name); + + writer.WriteLine("public ServerStub(I{0} implementation) : this(implementation, true) {{", Descriptor.Name); + writer.WriteLine("}"); + writer.WriteLine("public ServerStub(I{0} implementation, bool dispose) : this(new Dispatch(implementation, dispose), dispose) {{", Descriptor.Name); + writer.WriteLine("}"); + + writer.WriteLine("public ServerStub(pb::IRpcDispatch implementation) : this(implementation, true) {"); + writer.WriteLine("}"); + writer.WriteLine("public ServerStub(pb::IRpcDispatch implementation, bool dispose) {"); + writer.WriteLine(" if (null == (this.implementation = implementation)) throw new global::System.ArgumentNullException();"); + writer.WriteLine(" this.dispose = dispose && implementation is global::System.IDisposable;"); + writer.WriteLine("}"); + writer.WriteLine(); + + writer.WriteLine("public void Dispose() {"); + writer.WriteLine(" if (dispose) ((global::System.IDisposable)implementation).Dispose();"); + writer.WriteLine("}"); + writer.WriteLine(); + + writer.WriteLine("public pb::IMessageLite CallMethod(string methodName, pb::CodedInputStream input, pb::ExtensionRegistry registry) {{", Descriptor.Name); + writer.Indent(); + writer.WriteLine("switch(methodName) {"); + writer.Indent(); + + foreach (MethodDescriptor method in Descriptor.Methods) + { + writer.WriteLine("case \"{0}\": return implementation.CallMethod(methodName, {1}.ParseFrom(input, registry), {2}.CreateBuilder());", method.Name, GetClassName(method.InputType), GetClassName(method.OutputType)); + } + writer.WriteLine("default: throw new global::System.MissingMethodException(typeof(ISearchService).FullName, methodName);"); + writer.Outdent(); + writer.WriteLine("}");//end switch + writer.Outdent(); + writer.WriteLine("}");//end invoke + writer.Outdent(); + writer.WriteLine("}");//end server + } + + writer.Outdent(); + writer.WriteLine("}"); + } + } + } +} diff --git a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj index bdfebfa9..f72bcf87 100644 --- a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj +++ b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj @@ -1,141 +1,143 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {DD01ED24-3750-4567-9A23-1DB676A15610} - Library - Properties - Google.ProtocolBuffers - Google.ProtocolBuffers.Test - v2.0 - 512 - true - Properties\Google.ProtocolBuffers.Test.snk - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\lib\NUnit 2.2.8.0\nunit.framework.dll - - - False - ..\..\lib\Rhino.Mocks.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {6908BDCE-D925-43F3-94AC-A531E6DF2591} - ProtocolBuffers - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {DD01ED24-3750-4567-9A23-1DB676A15610} + Library + Properties + Google.ProtocolBuffers + Google.ProtocolBuffers.Test + v2.0 + 512 + true + Properties\Google.ProtocolBuffers.Test.snk + + + + + 3.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\lib\NUnit 2.2.8.0\nunit.framework.dll + + + False + ..\..\lib\Rhino.Mocks.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {6908BDCE-D925-43F3-94AC-A531E6DF2591} + ProtocolBuffers + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + --> \ No newline at end of file diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs new file mode 100644 index 00000000..f3faed92 --- /dev/null +++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs @@ -0,0 +1,1212 @@ +// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. 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; +namespace Google.ProtocolBuffers.TestProtos { + + public static partial class UnitTestRpcInterop { + + #region Extension registration + public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { + } + #endregion + #region Static variables + internal static pbd::MessageDescriptor internal__static_SearchRequest__Descriptor; + internal static pb::FieldAccess.FieldAccessorTable internal__static_SearchRequest__FieldAccessorTable; + internal static pbd::MessageDescriptor internal__static_SearchResponse__Descriptor; + internal static pb::FieldAccess.FieldAccessorTable internal__static_SearchResponse__FieldAccessorTable; + internal static pbd::MessageDescriptor internal__static_SearchResponse_ResultItem__Descriptor; + internal static pb::FieldAccess.FieldAccessorTable internal__static_SearchResponse_ResultItem__FieldAccessorTable; + internal static pbd::MessageDescriptor internal__static_RefineSearchRequest__Descriptor; + internal static pb::FieldAccess.FieldAccessorTable internal__static_RefineSearchRequest__FieldAccessorTable; + #endregion + #region Descriptor + public static pbd::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbd::FileDescriptor descriptor; + + static UnitTestRpcInterop() { + byte[] descriptorData = global::System.Convert.FromBase64String( + "CiFleHRlc3QvdW5pdHRlc3RfcnBjX2ludGVyb3AucHJvdG8aJGdvb2dsZS9w" + + "cm90b2J1Zi9jc2hhcnBfb3B0aW9ucy5wcm90byIhCg1TZWFyY2hSZXF1ZXN0" + + "EhAKCENyaXRlcmlhGAEgAygJImYKDlNlYXJjaFJlc3BvbnNlEisKB3Jlc3Vs" + + "dHMYASADKAsyGi5TZWFyY2hSZXNwb25zZS5SZXN1bHRJdGVtGicKClJlc3Vs" + + "dEl0ZW0SCwoDdXJsGAEgAigJEgwKBG5hbWUYAiABKAkiUgoTUmVmaW5lU2Vh" + + "cmNoUmVxdWVzdBIQCghDcml0ZXJpYRgBIAMoCRIpChBwcmV2aW91c19yZXN1" + + "bHRzGAIgAigLMg8uU2VhcmNoUmVzcG9uc2UypQEKDVNlYXJjaFNlcnZpY2US" + + "MAoGU2VhcmNoEg4uU2VhcmNoUmVxdWVzdBoPLlNlYXJjaFJlc3BvbnNlIgXC" + + "PgIIBRI1CgxSZWZpbmVTZWFyY2gSFC5SZWZpbmVTZWFyY2hSZXF1ZXN0Gg8u" + + "U2VhcmNoUmVzcG9uc2UaK8I+KAome0E2NUYwOTI1LUZEMTEtNGY5NC1CMTY2" + + "LTg5QUM0RjAyNzIwNX1CP0gBwj46CiFHb29nbGUuUHJvdG9jb2xCdWZmZXJz" + + "LlRlc3RQcm90b3MSElVuaXRUZXN0UnBjSW50ZXJvcIgOAw=="); + pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { + descriptor = root; + internal__static_SearchRequest__Descriptor = Descriptor.MessageTypes[0]; + internal__static_SearchRequest__FieldAccessorTable = + new pb::FieldAccess.FieldAccessorTable(internal__static_SearchRequest__Descriptor, + new string[] { "Criteria", }); + internal__static_SearchResponse__Descriptor = Descriptor.MessageTypes[1]; + internal__static_SearchResponse__FieldAccessorTable = + new pb::FieldAccess.FieldAccessorTable(internal__static_SearchResponse__Descriptor, + new string[] { "Results", }); + internal__static_SearchResponse_ResultItem__Descriptor = internal__static_SearchResponse__Descriptor.NestedTypes[0]; + internal__static_SearchResponse_ResultItem__FieldAccessorTable = + new pb::FieldAccess.FieldAccessorTable(internal__static_SearchResponse_ResultItem__Descriptor, + new string[] { "Url", "Name", }); + internal__static_RefineSearchRequest__Descriptor = Descriptor.MessageTypes[2]; + internal__static_RefineSearchRequest__FieldAccessorTable = + new pb::FieldAccess.FieldAccessorTable(internal__static_RefineSearchRequest__Descriptor, + new string[] { "Criteria", "PreviousResults", }); + pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); + RegisterAllExtensions(registry); + global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); + return registry; + }; + pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, + new pbd::FileDescriptor[] { + global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, + }, assigner); + } + #endregion + + } + #region Messages + public sealed partial class SearchRequest : pb::GeneratedMessage { + private static readonly SearchRequest defaultInstance = new Builder().BuildPartial(); + public static SearchRequest DefaultInstance { + get { return defaultInstance; } + } + + public override SearchRequest DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override SearchRequest ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.internal__static_SearchRequest__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { + get { return global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.internal__static_SearchRequest__FieldAccessorTable; } + } + + public const int CriteriaFieldNumber = 1; + private pbc::PopsicleList criteria_ = new pbc::PopsicleList(); + public scg::IList CriteriaList { + get { return pbc::Lists.AsReadOnly(criteria_); } + } + public int CriteriaCount { + get { return criteria_.Count; } + } + public string GetCriteria(int index) { + return criteria_[index]; + } + + public override bool IsInitialized { + get { + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + int size = SerializedSize; + if (criteria_.Count > 0) { + foreach (string element in criteria_) { + output.WriteString(1, element); + } + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + foreach (string element in CriteriaList) { + dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); + } + size += dataSize; + size += 1 * criteria_.Count; + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static SearchRequest ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static SearchRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static SearchRequest ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static SearchRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static SearchRequest ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static SearchRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static SearchRequest ParseDelimitedFrom(global::System.IO.Stream input) { + return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); + } + public static SearchRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); + } + public static SearchRequest ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static SearchRequest ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static Builder CreateBuilder() { return new Builder(); } + public override Builder ToBuilder() { return CreateBuilder(this); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(SearchRequest prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder { + protected override Builder ThisBuilder { + get { return this; } + } + public Builder() {} + + SearchRequest result = new SearchRequest(); + + protected override SearchRequest MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new SearchRequest(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Google.ProtocolBuffers.TestProtos.SearchRequest.Descriptor; } + } + + public override SearchRequest DefaultInstanceForType { + get { return global::Google.ProtocolBuffers.TestProtos.SearchRequest.DefaultInstance; } + } + + public override SearchRequest BuildPartial() { + if (result == null) { + throw new global::System.InvalidOperationException("build() has already been called on this Builder"); + } + result.criteria_.MakeReadOnly(); + SearchRequest returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is SearchRequest) { + return MergeFrom((SearchRequest) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(SearchRequest other) { + if (other == global::Google.ProtocolBuffers.TestProtos.SearchRequest.DefaultInstance) return this; + if (other.criteria_.Count != 0) { + base.AddRange(other.criteria_, result.criteria_); + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = null; + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + default: { + if (pb::WireFormat.IsEndGroupTag(tag)) { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + if (unknownFields == null) { + unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + } + ParseUnknownField(input, unknownFields, extensionRegistry, tag); + break; + } + case 10: { + AddCriteria(input.ReadString()); + break; + } + } + } + } + + + public pbc::IPopsicleList CriteriaList { + get { return result.criteria_; } + } + public int CriteriaCount { + get { return result.CriteriaCount; } + } + public string GetCriteria(int index) { + return result.GetCriteria(index); + } + public Builder SetCriteria(int index, string value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.criteria_[index] = value; + return this; + } + public Builder AddCriteria(string value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.criteria_.Add(value); + return this; + } + public Builder AddRangeCriteria(scg::IEnumerable values) { + base.AddRange(values, result.criteria_); + return this; + } + public Builder ClearCriteria() { + result.criteria_.Clear(); + return this; + } + } + static SearchRequest() { + object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.Descriptor, null); + } + } + + public sealed partial class SearchResponse : pb::GeneratedMessage { + private static readonly SearchResponse defaultInstance = new Builder().BuildPartial(); + public static SearchResponse DefaultInstance { + get { return defaultInstance; } + } + + public override SearchResponse DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override SearchResponse ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.internal__static_SearchResponse__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { + get { return global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.internal__static_SearchResponse__FieldAccessorTable; } + } + + #region Nested types + public static class Types { + public sealed partial class ResultItem : pb::GeneratedMessage { + private static readonly ResultItem defaultInstance = new Builder().BuildPartial(); + public static ResultItem DefaultInstance { + get { return defaultInstance; } + } + + public override ResultItem DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override ResultItem ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.internal__static_SearchResponse_ResultItem__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { + get { return global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.internal__static_SearchResponse_ResultItem__FieldAccessorTable; } + } + + public const int UrlFieldNumber = 1; + private bool hasUrl; + private string url_ = ""; + public bool HasUrl { + get { return hasUrl; } + } + public string Url { + get { return url_; } + } + + public const int NameFieldNumber = 2; + private bool hasName; + private string name_ = ""; + public bool HasName { + get { return hasName; } + } + public string Name { + get { return name_; } + } + + public override bool IsInitialized { + get { + if (!hasUrl) return false; + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + int size = SerializedSize; + if (HasUrl) { + output.WriteString(1, Url); + } + if (HasName) { + output.WriteString(2, Name); + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (HasUrl) { + size += pb::CodedOutputStream.ComputeStringSize(1, Url); + } + if (HasName) { + size += pb::CodedOutputStream.ComputeStringSize(2, Name); + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static ResultItem ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static ResultItem ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static ResultItem ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static ResultItem ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static ResultItem ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static ResultItem ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static ResultItem ParseDelimitedFrom(global::System.IO.Stream input) { + return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); + } + public static ResultItem ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); + } + public static ResultItem ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static ResultItem ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static Builder CreateBuilder() { return new Builder(); } + public override Builder ToBuilder() { return CreateBuilder(this); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(ResultItem prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder { + protected override Builder ThisBuilder { + get { return this; } + } + public Builder() {} + + ResultItem result = new ResultItem(); + + protected override ResultItem MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new ResultItem(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.Descriptor; } + } + + public override ResultItem DefaultInstanceForType { + get { return global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.DefaultInstance; } + } + + public override ResultItem BuildPartial() { + if (result == null) { + throw new global::System.InvalidOperationException("build() has already been called on this Builder"); + } + ResultItem returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is ResultItem) { + return MergeFrom((ResultItem) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(ResultItem other) { + if (other == global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.DefaultInstance) return this; + if (other.HasUrl) { + Url = other.Url; + } + if (other.HasName) { + Name = other.Name; + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = null; + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + default: { + if (pb::WireFormat.IsEndGroupTag(tag)) { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + if (unknownFields == null) { + unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + } + ParseUnknownField(input, unknownFields, extensionRegistry, tag); + break; + } + case 10: { + Url = input.ReadString(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + } + } + } + + + public bool HasUrl { + get { return result.HasUrl; } + } + public string Url { + get { return result.Url; } + set { SetUrl(value); } + } + public Builder SetUrl(string value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.hasUrl = true; + result.url_ = value; + return this; + } + public Builder ClearUrl() { + result.hasUrl = false; + result.url_ = ""; + return this; + } + + public bool HasName { + get { return result.HasName; } + } + public string Name { + get { return result.Name; } + set { SetName(value); } + } + public Builder SetName(string value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.hasName = true; + result.name_ = value; + return this; + } + public Builder ClearName() { + result.hasName = false; + result.name_ = ""; + return this; + } + } + static ResultItem() { + object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.Descriptor, null); + } + } + + } + #endregion + + public const int ResultsFieldNumber = 1; + private pbc::PopsicleList results_ = new pbc::PopsicleList(); + public scg::IList ResultsList { + get { return results_; } + } + public int ResultsCount { + get { return results_.Count; } + } + public global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem GetResults(int index) { + return results_[index]; + } + + public override bool IsInitialized { + get { + foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) { + if (!element.IsInitialized) return false; + } + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + int size = SerializedSize; + foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) { + output.WriteMessage(1, element); + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) { + size += pb::CodedOutputStream.ComputeMessageSize(1, element); + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static SearchResponse ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static SearchResponse ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static SearchResponse ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static SearchResponse ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static SearchResponse ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static SearchResponse ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static SearchResponse ParseDelimitedFrom(global::System.IO.Stream input) { + return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); + } + public static SearchResponse ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); + } + public static SearchResponse ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static SearchResponse ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static Builder CreateBuilder() { return new Builder(); } + public override Builder ToBuilder() { return CreateBuilder(this); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(SearchResponse prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder { + protected override Builder ThisBuilder { + get { return this; } + } + public Builder() {} + + SearchResponse result = new SearchResponse(); + + protected override SearchResponse MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new SearchResponse(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Google.ProtocolBuffers.TestProtos.SearchResponse.Descriptor; } + } + + public override SearchResponse DefaultInstanceForType { + get { return global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance; } + } + + public override SearchResponse BuildPartial() { + if (result == null) { + throw new global::System.InvalidOperationException("build() has already been called on this Builder"); + } + result.results_.MakeReadOnly(); + SearchResponse returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is SearchResponse) { + return MergeFrom((SearchResponse) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(SearchResponse other) { + if (other == global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance) return this; + if (other.results_.Count != 0) { + base.AddRange(other.results_, result.results_); + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = null; + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + default: { + if (pb::WireFormat.IsEndGroupTag(tag)) { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + if (unknownFields == null) { + unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + } + ParseUnknownField(input, unknownFields, extensionRegistry, tag); + break; + } + case 10: { + global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.CreateBuilder(); + input.ReadMessage(subBuilder, extensionRegistry); + AddResults(subBuilder.BuildPartial()); + break; + } + } + } + } + + + public pbc::IPopsicleList ResultsList { + get { return result.results_; } + } + public int ResultsCount { + get { return result.ResultsCount; } + } + public global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem GetResults(int index) { + return result.GetResults(index); + } + public Builder SetResults(int index, global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.results_[index] = value; + return this; + } + public Builder SetResults(int index, global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.Builder builderForValue) { + pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); + result.results_[index] = builderForValue.Build(); + return this; + } + public Builder AddResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.results_.Add(value); + return this; + } + public Builder AddResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.Builder builderForValue) { + pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); + result.results_.Add(builderForValue.Build()); + return this; + } + public Builder AddRangeResults(scg::IEnumerable values) { + base.AddRange(values, result.results_); + return this; + } + public Builder ClearResults() { + result.results_.Clear(); + return this; + } + } + static SearchResponse() { + object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.Descriptor, null); + } + } + + public sealed partial class RefineSearchRequest : pb::GeneratedMessage { + private static readonly RefineSearchRequest defaultInstance = new Builder().BuildPartial(); + public static RefineSearchRequest DefaultInstance { + get { return defaultInstance; } + } + + public override RefineSearchRequest DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override RefineSearchRequest ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.internal__static_RefineSearchRequest__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { + get { return global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.internal__static_RefineSearchRequest__FieldAccessorTable; } + } + + public const int CriteriaFieldNumber = 1; + private pbc::PopsicleList criteria_ = new pbc::PopsicleList(); + public scg::IList CriteriaList { + get { return pbc::Lists.AsReadOnly(criteria_); } + } + public int CriteriaCount { + get { return criteria_.Count; } + } + public string GetCriteria(int index) { + return criteria_[index]; + } + + public const int PreviousResultsFieldNumber = 2; + private bool hasPreviousResults; + private global::Google.ProtocolBuffers.TestProtos.SearchResponse previousResults_ = global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance; + public bool HasPreviousResults { + get { return hasPreviousResults; } + } + public global::Google.ProtocolBuffers.TestProtos.SearchResponse PreviousResults { + get { return previousResults_; } + } + + public override bool IsInitialized { + get { + if (!hasPreviousResults) return false; + if (!PreviousResults.IsInitialized) return false; + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + int size = SerializedSize; + if (criteria_.Count > 0) { + foreach (string element in criteria_) { + output.WriteString(1, element); + } + } + if (HasPreviousResults) { + output.WriteMessage(2, PreviousResults); + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + foreach (string element in CriteriaList) { + dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); + } + size += dataSize; + size += 1 * criteria_.Count; + } + if (HasPreviousResults) { + size += pb::CodedOutputStream.ComputeMessageSize(2, PreviousResults); + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static RefineSearchRequest ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static RefineSearchRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static RefineSearchRequest ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static RefineSearchRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static RefineSearchRequest ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static RefineSearchRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static RefineSearchRequest ParseDelimitedFrom(global::System.IO.Stream input) { + return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); + } + public static RefineSearchRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); + } + public static RefineSearchRequest ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static RefineSearchRequest ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static Builder CreateBuilder() { return new Builder(); } + public override Builder ToBuilder() { return CreateBuilder(this); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(RefineSearchRequest prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder { + protected override Builder ThisBuilder { + get { return this; } + } + public Builder() {} + + RefineSearchRequest result = new RefineSearchRequest(); + + protected override RefineSearchRequest MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new RefineSearchRequest(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.Descriptor; } + } + + public override RefineSearchRequest DefaultInstanceForType { + get { return global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.DefaultInstance; } + } + + public override RefineSearchRequest BuildPartial() { + if (result == null) { + throw new global::System.InvalidOperationException("build() has already been called on this Builder"); + } + result.criteria_.MakeReadOnly(); + RefineSearchRequest returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is RefineSearchRequest) { + return MergeFrom((RefineSearchRequest) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(RefineSearchRequest other) { + if (other == global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.DefaultInstance) return this; + if (other.criteria_.Count != 0) { + base.AddRange(other.criteria_, result.criteria_); + } + if (other.HasPreviousResults) { + MergePreviousResults(other.PreviousResults); + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = null; + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + default: { + if (pb::WireFormat.IsEndGroupTag(tag)) { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + if (unknownFields == null) { + unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + } + ParseUnknownField(input, unknownFields, extensionRegistry, tag); + break; + } + case 10: { + AddCriteria(input.ReadString()); + break; + } + case 18: { + global::Google.ProtocolBuffers.TestProtos.SearchResponse.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder(); + if (HasPreviousResults) { + subBuilder.MergeFrom(PreviousResults); + } + input.ReadMessage(subBuilder, extensionRegistry); + PreviousResults = subBuilder.BuildPartial(); + break; + } + } + } + } + + + public pbc::IPopsicleList CriteriaList { + get { return result.criteria_; } + } + public int CriteriaCount { + get { return result.CriteriaCount; } + } + public string GetCriteria(int index) { + return result.GetCriteria(index); + } + public Builder SetCriteria(int index, string value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.criteria_[index] = value; + return this; + } + public Builder AddCriteria(string value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.criteria_.Add(value); + return this; + } + public Builder AddRangeCriteria(scg::IEnumerable values) { + base.AddRange(values, result.criteria_); + return this; + } + public Builder ClearCriteria() { + result.criteria_.Clear(); + return this; + } + + public bool HasPreviousResults { + get { return result.HasPreviousResults; } + } + public global::Google.ProtocolBuffers.TestProtos.SearchResponse PreviousResults { + get { return result.PreviousResults; } + set { SetPreviousResults(value); } + } + public Builder SetPreviousResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.hasPreviousResults = true; + result.previousResults_ = value; + return this; + } + public Builder SetPreviousResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse.Builder builderForValue) { + pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); + result.hasPreviousResults = true; + result.previousResults_ = builderForValue.Build(); + return this; + } + public Builder MergePreviousResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + if (result.HasPreviousResults && + result.previousResults_ != global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance) { + result.previousResults_ = global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder(result.previousResults_).MergeFrom(value).BuildPartial(); + } else { + result.previousResults_ = value; + } + result.hasPreviousResults = true; + return this; + } + public Builder ClearPreviousResults() { + result.hasPreviousResults = false; + result.previousResults_ = global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance; + return this; + } + } + static RefineSearchRequest() { + object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInterop.Descriptor, null); + } + } + + #endregion + + #region Services + [global::System.Runtime.InteropServices.GuidAttribute("a65f0925-fd11-4f94-b166-89ac4f027205")] + public partial interface ISearchService { + [global::System.Runtime.InteropServices.DispId(5)] + global::Google.ProtocolBuffers.TestProtos.SearchResponse Search(global::Google.ProtocolBuffers.TestProtos.SearchRequest searchRequest); + global::Google.ProtocolBuffers.TestProtos.SearchResponse RefineSearch(global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest refineSearchRequest); + } + + [global::System.CLSCompliant(false)] + public partial class SearchService : ISearchService, pb::IRpcDispatch, global::System.IDisposable { + private readonly bool dispose; + private readonly pb::IRpcDispatch dispatch; + public SearchService(pb::IRpcDispatch dispatch) : this(dispatch, true) { + } + public SearchService(pb::IRpcDispatch dispatch, bool dispose) { + if (null == (this.dispatch = dispatch)) throw new global::System.ArgumentNullException(); + this.dispose = dispose && dispatch is global::System.IDisposable; + } + + public void Dispose() { + if (dispose) ((global::System.IDisposable)dispatch).Dispose(); + } + + TMessage pb::IRpcDispatch.CallMethod(string method, pb::IMessageLite request, pb::IBuilderLite response) { + return dispatch.CallMethod(method, request, response); + } + + public global::Google.ProtocolBuffers.TestProtos.SearchResponse Search(global::Google.ProtocolBuffers.TestProtos.SearchRequest searchRequest) { + return dispatch.CallMethod("Search", searchRequest, global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder()); + } + + public global::Google.ProtocolBuffers.TestProtos.SearchResponse RefineSearch(global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest refineSearchRequest) { + return dispatch.CallMethod("RefineSearch", refineSearchRequest, global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder()); + } + + [global::System.CLSCompliant(false)] + public partial class Dispatch : pb::IRpcDispatch, global::System.IDisposable { + private readonly bool dispose; + private readonly ISearchService implementation; + public Dispatch(ISearchService implementation) : this(implementation, true) { + } + public Dispatch(ISearchService implementation, bool dispose) { + if (null == (this.implementation = implementation)) throw new global::System.ArgumentNullException(); + this.dispose = dispose && implementation is global::System.IDisposable; + } + + public void Dispose() { + if (dispose) ((global::System.IDisposable)implementation).Dispose(); + } + + public TMessage CallMethod(string methodName, pb::IMessageLite request, pb::IBuilderLite response) + where TMessage : IMessageLite + where TBuilder : IBuilderLite { + switch(methodName) { + 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(); + default: throw new global::System.MissingMethodException(typeof(ISearchService).FullName, methodName); + } + } + } + [global::System.CLSCompliant(false)] + public partial class ServerStub : pb::IRpcServerStub, global::System.IDisposable { + private readonly bool dispose; + private readonly pb::IRpcDispatch implementation; + public ServerStub(ISearchService implementation) : this(implementation, true) { + } + public ServerStub(ISearchService implementation, bool dispose) : this(new Dispatch(implementation, dispose), dispose) { + } + public ServerStub(pb::IRpcDispatch implementation) : this(implementation, true) { + } + public ServerStub(pb::IRpcDispatch implementation, bool dispose) { + if (null == (this.implementation = implementation)) throw new global::System.ArgumentNullException(); + this.dispose = dispose && implementation is global::System.IDisposable; + } + + public void Dispose() { + if (dispose) ((global::System.IDisposable)implementation).Dispose(); + } + + public pb::IMessageLite CallMethod(string methodName, pb::CodedInputStream input, pb::ExtensionRegistry registry) { + switch(methodName) { + case "Search": return implementation.CallMethod(methodName, global::Google.ProtocolBuffers.TestProtos.SearchRequest.ParseFrom(input, registry), global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder()); + case "RefineSearch": return implementation.CallMethod(methodName, global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.ParseFrom(input, registry), global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder()); + default: throw new global::System.MissingMethodException(typeof(ISearchService).FullName, methodName); + } + } + } + } + #endregion + +} diff --git a/src/ProtocolBuffers.Test/TestRpcGenerator.cs b/src/ProtocolBuffers.Test/TestRpcGenerator.cs new file mode 100644 index 00000000..ac98c496 --- /dev/null +++ b/src/ProtocolBuffers.Test/TestRpcGenerator.cs @@ -0,0 +1,153 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// http://github.com/jskeet/dotnet-protobufs/ +// Original C++/Java/Python code: +// http://code.google.com/p/protobuf/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using Google.ProtocolBuffers; +using Google.ProtocolBuffers.TestProtos; +using NUnit.Framework; + +namespace Google.ProtocolBuffers +{ + /// + /// This class verifies the correct code is generated from unittest_rpc_interop.proto and provides a small demonstration + /// of using the new IRpcDispatch to write a client/server + /// + [TestFixture] + public class TestRpcGenerator + { + /// + /// A sample implementation of the ISearchService for testing + /// + class ExampleSearchImpl : ISearchService { + SearchResponse ISearchService.Search(SearchRequest searchRequest) { + if (searchRequest.CriteriaCount == 0) { + throw new ArgumentException("No criteria specified.", new InvalidOperationException()); + } + SearchResponse.Builder resp = SearchResponse.CreateBuilder(); + foreach (string criteria in searchRequest.CriteriaList) { + resp.AddResults(SearchResponse.Types.ResultItem.CreateBuilder().SetName(criteria).SetUrl("http://search.com").Build()); + } + return resp.Build(); + } + + SearchResponse ISearchService.RefineSearch(RefineSearchRequest refineSearchRequest) { + SearchResponse.Builder resp = refineSearchRequest.PreviousResults.ToBuilder(); + foreach (string criteria in refineSearchRequest.CriteriaList) { + resp.AddResults(SearchResponse.Types.ResultItem.CreateBuilder().SetName(criteria).SetUrl("http://refine.com").Build()); + } + return resp.Build(); + } + } + + /// + /// An example extraction of the wire protocol + /// + interface IWireTransfer + { + byte[] Execute(string method, byte[] message); + } + + /// + /// An example of a server responding to a wire request + /// + class ExampleServerHost : IWireTransfer + { + readonly IRpcServerStub _stub; + public ExampleServerHost(ISearchService implementation) + { + //on the server, we create a dispatch to call the appropriate method by name + IRpcDispatch dispatch = new SearchService.Dispatch(implementation); + //we then wrap that dispatch in a server stub which will deserialize the wire bytes to the message + //type appropriate for the method name being invoked. + _stub = new SearchService.ServerStub(dispatch); + } + + byte[] IWireTransfer.Execute(string method, byte[] message) + { + //now when we recieve a wire transmission to invoke a method by name with a byte[] or stream payload + //we just simply call the sub: + IMessageLite response = _stub.CallMethod(method, CodedInputStream.CreateInstance(message), ExtensionRegistry.Empty); + //now we return the expected response message: + return response.ToByteArray(); + } + } + + /// + /// An example of a client sending a wire request + /// + class ExampleClient : IRpcDispatch + { + readonly IWireTransfer _wire; + public ExampleClient(IWireTransfer wire) + { + _wire = wire; + } + + TMessage IRpcDispatch.CallMethod(string method, IMessageLite request, IBuilderLite response) + { + byte[] rawResponse = _wire.Execute(method, request.ToByteArray()); + response.MergeFrom(rawResponse); + return response.Build(); + } + } + + /// + /// Put it all together to create one seamless client/server experience full of rich-type goodness ;) + /// All you need to do is send/recieve the method name and message bytes across the wire. + /// + [Test] + public void TestClientServerDispatch() + { + ExampleServerHost server = new ExampleServerHost(new ExampleSearchImpl()); + //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting + IWireTransfer wire = server; + + ISearchService client = new SearchService(new ExampleClient(wire)); + //now the client has a real, typed, interface to work with: + SearchResponse result = client.Search(SearchRequest.CreateBuilder().AddCriteria("Test").Build()); + Assert.AreEqual(1, result.ResultsCount); + Assert.AreEqual("Test", result.ResultsList[0].Name); + Assert.AreEqual("http://search.com", result.ResultsList[0].Url); + + //The test part of this, call the only other method + result = client.RefineSearch(RefineSearchRequest.CreateBuilder().SetPreviousResults(result).AddCriteria("Refine").Build()); + Assert.AreEqual(2, result.ResultsCount); + Assert.AreEqual("Test", result.ResultsList[0].Name); + Assert.AreEqual("http://search.com", result.ResultsList[0].Url); + + Assert.AreEqual("Refine", result.ResultsList[1].Name); + Assert.AreEqual("http://refine.com", result.ResultsList[1].Url); + } + } +} \ No newline at end of file diff --git a/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs b/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs index e2211b24..7eef5708 100644 --- a/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs +++ b/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs @@ -12,6 +12,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { registry.Add(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.CSharpFileOptions); registry.Add(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.CSharpFieldOptions); + registry.Add(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.CsharpServiceOptions); + registry.Add(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.CsharpMethodOptions); } #endregion #region Extensions @@ -19,6 +21,10 @@ namespace Google.ProtocolBuffers.DescriptorProtos { public static pb::GeneratedExtensionBase CSharpFileOptions; public const int CSharpFieldOptionsFieldNumber = 1000; public static pb::GeneratedExtensionBase CSharpFieldOptions; + public const int CsharpServiceOptionsFieldNumber = 1000; + public static pb::GeneratedExtensionBase CsharpServiceOptions; + public const int CsharpMethodOptionsFieldNumber = 1000; + public static pb::GeneratedExtensionBase CsharpMethodOptions; #endregion #region Static variables @@ -26,6 +32,10 @@ namespace Google.ProtocolBuffers.DescriptorProtos { internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_CSharpFileOptions__FieldAccessorTable; internal static pbd::MessageDescriptor internal__static_google_protobuf_CSharpFieldOptions__Descriptor; internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_CSharpFieldOptions__FieldAccessorTable; + internal static pbd::MessageDescriptor internal__static_google_protobuf_CSharpServiceOptions__Descriptor; + internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_CSharpServiceOptions__FieldAccessorTable; + internal static pbd::MessageDescriptor internal__static_google_protobuf_CSharpMethodOptions__Descriptor; + internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_CSharpMethodOptions__FieldAccessorTable; #endregion #region Descriptor public static pbd::FileDescriptor Descriptor { @@ -37,7 +47,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { byte[] descriptorData = global::System.Convert.FromBase64String( "CiRnb29nbGUvcHJvdG9idWYvY3NoYXJwX29wdGlvbnMucHJvdG8SD2dvb2ds" + "ZS5wcm90b2J1ZhogZ29vZ2xlL3Byb3RvYnVmL2Rlc2NyaXB0b3IucHJvdG8i" + - "6wIKEUNTaGFycEZpbGVPcHRpb25zEhEKCW5hbWVzcGFjZRgBIAEoCRIaChJ1" + + "uQMKEUNTaGFycEZpbGVPcHRpb25zEhEKCW5hbWVzcGFjZRgBIAEoCRIaChJ1" + "bWJyZWxsYV9jbGFzc25hbWUYAiABKAkSHAoOcHVibGljX2NsYXNzZXMYAyAB" + "KAg6BHRydWUSFgoObXVsdGlwbGVfZmlsZXMYBCABKAgSFAoMbmVzdF9jbGFz" + "c2VzGAUgASgIEhYKDmNvZGVfY29udHJhY3RzGAYgASgIEiQKHGV4cGFuZF9u" + @@ -45,24 +55,44 @@ namespace Google.ProtocolBuffers.DescriptorProtos { "CCABKAg6BHRydWUSHAoOZmlsZV9leHRlbnNpb24Y3QEgASgJOgMuY3MSGwoS" + "dW1icmVsbGFfbmFtZXNwYWNlGN4BIAEoCRIcChBvdXRwdXRfZGlyZWN0b3J5" + "GN8BIAEoCToBLhImChZpZ25vcmVfZ29vZ2xlX3Byb3RvYnVmGOABIAEoCDoF" + - "ZmFsc2UiKwoSQ1NoYXJwRmllbGRPcHRpb25zEhUKDXByb3BlcnR5X25hbWUY" + - "ASABKAk6XgoTY3NoYXJwX2ZpbGVfb3B0aW9ucxIcLmdvb2dsZS5wcm90b2J1" + - "Zi5GaWxlT3B0aW9ucxjoByABKAsyIi5nb29nbGUucHJvdG9idWYuQ1NoYXJw" + - "RmlsZU9wdGlvbnM6YQoUY3NoYXJwX2ZpZWxkX29wdGlvbnMSHS5nb29nbGUu" + - "cHJvdG9idWYuRmllbGRPcHRpb25zGOgHIAEoCzIjLmdvb2dsZS5wcm90b2J1" + - "Zi5DU2hhcnBGaWVsZE9wdGlvbnM="); + "ZmFsc2USTAoWc2VydmljZV9nZW5lcmF0b3JfdHlwZRjhASABKA4yIi5nb29n" + + "bGUucHJvdG9idWYuQ1NoYXJwU2VydmljZVR5cGU6B0dFTkVSSUMiKwoSQ1No" + + "YXJwRmllbGRPcHRpb25zEhUKDXByb3BlcnR5X25hbWUYASABKAkiLAoUQ1No" + + "YXJwU2VydmljZU9wdGlvbnMSFAoMaW50ZXJmYWNlX2lkGAEgASgJIioKE0NT" + + "aGFycE1ldGhvZE9wdGlvbnMSEwoLZGlzcGF0Y2hfaWQYASABKAUqQQoRQ1No" + + "YXJwU2VydmljZVR5cGUSCwoHR0VORVJJQxABEg0KCUlOVEVSRkFDRRACEhAK" + + "DElSUENESVNQQVRDSBADOl4KE2NzaGFycF9maWxlX29wdGlvbnMSHC5nb29n" + + "bGUucHJvdG9idWYuRmlsZU9wdGlvbnMY6AcgASgLMiIuZ29vZ2xlLnByb3Rv" + + "YnVmLkNTaGFycEZpbGVPcHRpb25zOmEKFGNzaGFycF9maWVsZF9vcHRpb25z" + + "Eh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxjoByABKAsyIy5nb29n" + + "bGUucHJvdG9idWYuQ1NoYXJwRmllbGRPcHRpb25zOmcKFmNzaGFycF9zZXJ2" + + "aWNlX29wdGlvbnMSHy5nb29nbGUucHJvdG9idWYuU2VydmljZU9wdGlvbnMY" + + "6AcgASgLMiUuZ29vZ2xlLnByb3RvYnVmLkNTaGFycFNlcnZpY2VPcHRpb25z" + + "OmQKFWNzaGFycF9tZXRob2Rfb3B0aW9ucxIeLmdvb2dsZS5wcm90b2J1Zi5N" + + "ZXRob2RPcHRpb25zGOgHIAEoCzIkLmdvb2dsZS5wcm90b2J1Zi5DU2hhcnBN" + + "ZXRob2RPcHRpb25z"); pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { descriptor = root; internal__static_google_protobuf_CSharpFileOptions__Descriptor = Descriptor.MessageTypes[0]; internal__static_google_protobuf_CSharpFileOptions__FieldAccessorTable = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_CSharpFileOptions__Descriptor, - new string[] { "Namespace", "UmbrellaClassname", "PublicClasses", "MultipleFiles", "NestClasses", "CodeContracts", "ExpandNamespaceDirectories", "ClsCompliance", "FileExtension", "UmbrellaNamespace", "OutputDirectory", "IgnoreGoogleProtobuf", }); + new string[] { "Namespace", "UmbrellaClassname", "PublicClasses", "MultipleFiles", "NestClasses", "CodeContracts", "ExpandNamespaceDirectories", "ClsCompliance", "FileExtension", "UmbrellaNamespace", "OutputDirectory", "IgnoreGoogleProtobuf", "ServiceGeneratorType", }); internal__static_google_protobuf_CSharpFieldOptions__Descriptor = Descriptor.MessageTypes[1]; internal__static_google_protobuf_CSharpFieldOptions__FieldAccessorTable = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_CSharpFieldOptions__Descriptor, new string[] { "PropertyName", }); + internal__static_google_protobuf_CSharpServiceOptions__Descriptor = Descriptor.MessageTypes[2]; + internal__static_google_protobuf_CSharpServiceOptions__FieldAccessorTable = + new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_CSharpServiceOptions__Descriptor, + new string[] { "InterfaceId", }); + internal__static_google_protobuf_CSharpMethodOptions__Descriptor = Descriptor.MessageTypes[3]; + internal__static_google_protobuf_CSharpMethodOptions__FieldAccessorTable = + new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_CSharpMethodOptions__Descriptor, + new string[] { "DispatchId", }); global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.CSharpFileOptions = pb::GeneratedSingleExtension.CreateInstance(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor.Extensions[0]); global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.CSharpFieldOptions = pb::GeneratedSingleExtension.CreateInstance(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor.Extensions[1]); + global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.CsharpServiceOptions = pb::GeneratedSingleExtension.CreateInstance(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor.Extensions[2]); + global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.CsharpMethodOptions = pb::GeneratedSingleExtension.CreateInstance(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor.Extensions[3]); return null; }; pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, @@ -73,6 +103,15 @@ namespace Google.ProtocolBuffers.DescriptorProtos { #endregion } + #region Enums + public enum CSharpServiceType { + GENERIC = 1, + INTERFACE = 2, + IRPCDISPATCH = 3, + } + + #endregion + #region Messages public sealed partial class CSharpFileOptions : pb::GeneratedMessage { private static readonly CSharpFileOptions defaultInstance = new Builder().BuildPartial(); @@ -216,6 +255,16 @@ namespace Google.ProtocolBuffers.DescriptorProtos { get { return ignoreGoogleProtobuf_; } } + public const int ServiceGeneratorTypeFieldNumber = 225; + private bool hasServiceGeneratorType; + private global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType serviceGeneratorType_ = global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType.GENERIC; + public bool HasServiceGeneratorType { + get { return hasServiceGeneratorType; } + } + public global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType ServiceGeneratorType { + get { return serviceGeneratorType_; } + } + public override bool IsInitialized { get { return true; @@ -260,6 +309,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos { if (HasIgnoreGoogleProtobuf) { output.WriteBool(224, IgnoreGoogleProtobuf); } + if (HasServiceGeneratorType) { + output.WriteEnum(225, (int) ServiceGeneratorType); + } UnknownFields.WriteTo(output); } @@ -306,6 +358,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos { if (HasIgnoreGoogleProtobuf) { size += pb::CodedOutputStream.ComputeBoolSize(224, IgnoreGoogleProtobuf); } + if (HasServiceGeneratorType) { + size += pb::CodedOutputStream.ComputeEnumSize(225, (int) ServiceGeneratorType); + } size += UnknownFields.SerializedSize; memoizedSerializedSize = size; return size; @@ -434,6 +489,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos { if (other.HasIgnoreGoogleProtobuf) { IgnoreGoogleProtobuf = other.IgnoreGoogleProtobuf; } + if (other.HasServiceGeneratorType) { + ServiceGeneratorType = other.ServiceGeneratorType; + } this.MergeUnknownFields(other.UnknownFields); return this; } @@ -514,6 +572,18 @@ namespace Google.ProtocolBuffers.DescriptorProtos { IgnoreGoogleProtobuf = input.ReadBool(); break; } + case 1800: { + int rawValue = input.ReadEnum(); + if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType), rawValue)) { + if (unknownFields == null) { + unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + } + unknownFields.MergeVarintField(225, (ulong) rawValue); + } else { + ServiceGeneratorType = (global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType) rawValue; + } + break; + } } } } @@ -739,6 +809,24 @@ namespace Google.ProtocolBuffers.DescriptorProtos { result.ignoreGoogleProtobuf_ = false; return this; } + + public bool HasServiceGeneratorType { + get { return result.HasServiceGeneratorType; } + } + public global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType ServiceGeneratorType { + get { return result.ServiceGeneratorType; } + set { SetServiceGeneratorType(value); } + } + public Builder SetServiceGeneratorType(global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType value) { + result.hasServiceGeneratorType = true; + result.serviceGeneratorType_ = value; + return this; + } + public Builder ClearServiceGeneratorType() { + result.hasServiceGeneratorType = false; + result.serviceGeneratorType_ = global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType.GENERIC; + return this; + } } static CSharpFileOptions() { object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, null); @@ -961,6 +1049,437 @@ namespace Google.ProtocolBuffers.DescriptorProtos { } } + public sealed partial class CSharpServiceOptions : pb::GeneratedMessage { + private static readonly CSharpServiceOptions defaultInstance = new Builder().BuildPartial(); + public static CSharpServiceOptions DefaultInstance { + get { return defaultInstance; } + } + + public override CSharpServiceOptions DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override CSharpServiceOptions ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.internal__static_google_protobuf_CSharpServiceOptions__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { + get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.internal__static_google_protobuf_CSharpServiceOptions__FieldAccessorTable; } + } + + public const int InterfaceIdFieldNumber = 1; + private bool hasInterfaceId; + private string interfaceId_ = ""; + public bool HasInterfaceId { + get { return hasInterfaceId; } + } + public string InterfaceId { + get { return interfaceId_; } + } + + public override bool IsInitialized { + get { + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + int size = SerializedSize; + if (HasInterfaceId) { + output.WriteString(1, InterfaceId); + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (HasInterfaceId) { + size += pb::CodedOutputStream.ComputeStringSize(1, InterfaceId); + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static CSharpServiceOptions ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static CSharpServiceOptions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static CSharpServiceOptions ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static CSharpServiceOptions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static CSharpServiceOptions ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static CSharpServiceOptions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static CSharpServiceOptions ParseDelimitedFrom(global::System.IO.Stream input) { + return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); + } + public static CSharpServiceOptions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); + } + public static CSharpServiceOptions ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static CSharpServiceOptions ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static Builder CreateBuilder() { return new Builder(); } + public override Builder ToBuilder() { return CreateBuilder(this); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(CSharpServiceOptions prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder { + protected override Builder ThisBuilder { + get { return this; } + } + public Builder() {} + + CSharpServiceOptions result = new CSharpServiceOptions(); + + protected override CSharpServiceOptions MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new CSharpServiceOptions(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceOptions.Descriptor; } + } + + public override CSharpServiceOptions DefaultInstanceForType { + get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceOptions.DefaultInstance; } + } + + public override CSharpServiceOptions BuildPartial() { + if (result == null) { + throw new global::System.InvalidOperationException("build() has already been called on this Builder"); + } + CSharpServiceOptions returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is CSharpServiceOptions) { + return MergeFrom((CSharpServiceOptions) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(CSharpServiceOptions other) { + if (other == global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceOptions.DefaultInstance) return this; + if (other.HasInterfaceId) { + InterfaceId = other.InterfaceId; + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = null; + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + default: { + if (pb::WireFormat.IsEndGroupTag(tag)) { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + if (unknownFields == null) { + unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + } + ParseUnknownField(input, unknownFields, extensionRegistry, tag); + break; + } + case 10: { + InterfaceId = input.ReadString(); + break; + } + } + } + } + + + public bool HasInterfaceId { + get { return result.HasInterfaceId; } + } + public string InterfaceId { + get { return result.InterfaceId; } + set { SetInterfaceId(value); } + } + public Builder SetInterfaceId(string value) { + pb::ThrowHelper.ThrowIfNull(value, "value"); + result.hasInterfaceId = true; + result.interfaceId_ = value; + return this; + } + public Builder ClearInterfaceId() { + result.hasInterfaceId = false; + result.interfaceId_ = ""; + return this; + } + } + static CSharpServiceOptions() { + object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, null); + } + } + + public sealed partial class CSharpMethodOptions : pb::GeneratedMessage { + private static readonly CSharpMethodOptions defaultInstance = new Builder().BuildPartial(); + public static CSharpMethodOptions DefaultInstance { + get { return defaultInstance; } + } + + public override CSharpMethodOptions DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override CSharpMethodOptions ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.internal__static_google_protobuf_CSharpMethodOptions__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { + get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.internal__static_google_protobuf_CSharpMethodOptions__FieldAccessorTable; } + } + + public const int DispatchIdFieldNumber = 1; + private bool hasDispatchId; + private int dispatchId_ = 0; + public bool HasDispatchId { + get { return hasDispatchId; } + } + public int DispatchId { + get { return dispatchId_; } + } + + public override bool IsInitialized { + get { + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + int size = SerializedSize; + if (HasDispatchId) { + output.WriteInt32(1, DispatchId); + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (HasDispatchId) { + size += pb::CodedOutputStream.ComputeInt32Size(1, DispatchId); + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static CSharpMethodOptions ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static CSharpMethodOptions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static CSharpMethodOptions ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static CSharpMethodOptions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); + } + public static CSharpMethodOptions ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static CSharpMethodOptions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static CSharpMethodOptions ParseDelimitedFrom(global::System.IO.Stream input) { + return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); + } + public static CSharpMethodOptions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { + return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); + } + public static CSharpMethodOptions ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static CSharpMethodOptions ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); + } + public static Builder CreateBuilder() { return new Builder(); } + public override Builder ToBuilder() { return CreateBuilder(this); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(CSharpMethodOptions prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder { + protected override Builder ThisBuilder { + get { return this; } + } + public Builder() {} + + CSharpMethodOptions result = new CSharpMethodOptions(); + + protected override CSharpMethodOptions MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new CSharpMethodOptions(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpMethodOptions.Descriptor; } + } + + public override CSharpMethodOptions DefaultInstanceForType { + get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpMethodOptions.DefaultInstance; } + } + + public override CSharpMethodOptions BuildPartial() { + if (result == null) { + throw new global::System.InvalidOperationException("build() has already been called on this Builder"); + } + CSharpMethodOptions returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is CSharpMethodOptions) { + return MergeFrom((CSharpMethodOptions) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(CSharpMethodOptions other) { + if (other == global::Google.ProtocolBuffers.DescriptorProtos.CSharpMethodOptions.DefaultInstance) return this; + if (other.HasDispatchId) { + DispatchId = other.DispatchId; + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = null; + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + default: { + if (pb::WireFormat.IsEndGroupTag(tag)) { + if (unknownFields != null) { + this.UnknownFields = unknownFields.Build(); + } + return this; + } + if (unknownFields == null) { + unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + } + ParseUnknownField(input, unknownFields, extensionRegistry, tag); + break; + } + case 8: { + DispatchId = input.ReadInt32(); + break; + } + } + } + } + + + public bool HasDispatchId { + get { return result.HasDispatchId; } + } + public int DispatchId { + get { return result.DispatchId; } + set { SetDispatchId(value); } + } + public Builder SetDispatchId(int value) { + result.hasDispatchId = true; + result.dispatchId_ = value; + return this; + } + public Builder ClearDispatchId() { + result.hasDispatchId = false; + result.dispatchId_ = 0; + return this; + } + } + static CSharpMethodOptions() { + object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, null); + } + } + #endregion } diff --git a/src/ProtocolBuffers/IRpcDispatch.cs b/src/ProtocolBuffers/IRpcDispatch.cs new file mode 100644 index 00000000..19f656ab --- /dev/null +++ b/src/ProtocolBuffers/IRpcDispatch.cs @@ -0,0 +1,53 @@ +#region Copyright notice and license +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// http://github.com/jskeet/dotnet-protobufs/ +// Original C++/Java/Python code: +// http://code.google.com/p/protobuf/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Google.ProtocolBuffers +{ + /// + /// + /// + public interface IRpcServerStub + { + IMessageLite CallMethod(string methodName, CodedInputStream input, ExtensionRegistry registry); + } + + public interface IRpcDispatch + { + TMessage CallMethod(string method, IMessageLite request, IBuilderLite response) + where TMessage : IMessageLite + where TBuilder : IBuilderLite; + } +} diff --git a/src/ProtocolBuffers/ProtocolBuffers.csproj b/src/ProtocolBuffers/ProtocolBuffers.csproj index 8da01c9a..5c1721cf 100644 --- a/src/ProtocolBuffers/ProtocolBuffers.csproj +++ b/src/ProtocolBuffers/ProtocolBuffers.csproj @@ -1,212 +1,213 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {6908BDCE-D925-43F3-94AC-A531E6DF2591} - Library - Properties - Google.ProtocolBuffers - Google.ProtocolBuffers - v2.0 - 512 - true - Properties\Google.ProtocolBuffers.snk - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - AllRules.ruleset - - - true - full - false - bin\Debug_Silverlight2\ - DEBUG;TRACE;SILVERLIGHT2 - prompt - 4 - true - AllRules.ruleset - - - pdbonly - true - bin\Release_Silverlight2\ - TRACE;SILVERLIGHT2 - prompt - 4 - true - AllRules.ruleset - - - - - - - - - - Code - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {6908BDCE-D925-43F3-94AC-A531E6DF2591} + Library + Properties + Google.ProtocolBuffers + Google.ProtocolBuffers + v2.0 + 512 + true + Properties\Google.ProtocolBuffers.snk + + + + + 3.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + AllRules.ruleset + + + true + full + false + bin\Debug_Silverlight2\ + DEBUG;TRACE;SILVERLIGHT2 + prompt + 4 + true + AllRules.ruleset + + + pdbonly + true + bin\Release_Silverlight2\ + TRACE;SILVERLIGHT2 + prompt + 4 + true + AllRules.ruleset + + + + + + + + + + Code + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + + --> \ No newline at end of file diff --git a/src/ProtocolBuffers2008.sln b/src/ProtocolBuffers2008.sln index b9c1f353..a73fdd44 100644 --- a/src/ProtocolBuffers2008.sln +++ b/src/ProtocolBuffers2008.sln @@ -1,167 +1,168 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C-5FC2-4671-9216-781CB8187EC7}" - ProjectSection(SolutionItems) = preProject - ..\protos\tutorial\addressbook.proto = ..\protos\tutorial\addressbook.proto - ..\protos\google\protobuf\csharp_options.proto = ..\protos\google\protobuf\csharp_options.proto - ..\protos\google\protobuf\descriptor.proto = ..\protos\google\protobuf\descriptor.proto - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8D3015A-EA39-4F03-AEEC-3FF1F2087A12}" - ProjectSection(SolutionItems) = preProject - ..\protos\google\protobuf\unittest.proto = ..\protos\google\protobuf\unittest.proto - ..\protos\google\protobuf\unittest_csharp_options.proto = ..\protos\google\protobuf\unittest_csharp_options.proto - ..\protos\google\protobuf\unittest_custom_options.proto = ..\protos\google\protobuf\unittest_custom_options.proto - ..\protos\google\protobuf\unittest_embed_optimize_for.proto = ..\protos\google\protobuf\unittest_embed_optimize_for.proto - ..\protos\google\protobuf\unittest_empty.proto = ..\protos\google\protobuf\unittest_empty.proto - ..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto - ..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto - ..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto - ..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto - ..\protos\google\protobuf\unittest_lite.proto = ..\protos\google\protobuf\unittest_lite.proto - ..\protos\google\protobuf\unittest_lite_imports_nonlite.proto = ..\protos\google\protobuf\unittest_lite_imports_nonlite.proto - ..\protos\google\protobuf\unittest_mset.proto = ..\protos\google\protobuf\unittest_mset.proto - ..\protos\google\protobuf\unittest_no_generic_services.proto = ..\protos\google\protobuf\unittest_no_generic_services.proto - ..\protos\google\protobuf\unittest_optimize_for.proto = ..\protos\google\protobuf\unittest_optimize_for.proto - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffers", "ProtocolBuffers\ProtocolBuffers.csproj", "{6908BDCE-D925-43F3-94AC-A531E6DF2591}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffers.Test", "ProtocolBuffers.Test\ProtocolBuffers.Test.csproj", "{DD01ED24-3750-4567-9A23-1DB676A15610}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoGen", "ProtoGen\ProtoGen.csproj", "{250ADE34-82FD-4BAE-86D5-985FBE589C4A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoGen.Test", "ProtoGen.Test\ProtoGen.Test.csproj", "{C268DA4C-4004-47DA-AF23-44C983281A68}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddressBook", "AddressBook\AddressBook.csproj", "{A31F5FB2-4FF3-432A-B35B-5CD203606311}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoMunge", "ProtoMunge\ProtoMunge.csproj", "{8F09AF72-3327-4FA7-BC09-070B80221AB9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoBench", "ProtoBench\ProtoBench.csproj", "{C7A4A435-2813-41C8-AA87-BD914BA5223D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoDump", "ProtoDump\ProtoDump.csproj", "{D7282E99-2DC3-405B-946F-177DB2FD2AE2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLite", "ProtocolBuffers\ProtocolBuffersLite.csproj", "{6969BDCE-D925-43F3-94AC-A531E6DF2591}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLite.Test", "ProtocolBuffersLite.Test\ProtocolBuffersLite.Test.csproj", "{EE01ED24-3750-4567-9A23-1DB676A15610}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLiteMixed.Test", "ProtocolBuffersLite.Test\ProtocolBuffersLiteMixed.Test.csproj", "{EEFFED24-3750-4567-9A23-1DB676A15610}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{66ED1950-AD27-42D7-88F8-94355AEC8225}" - ProjectSection(SolutionItems) = preProject - ..\build\Build.bat = ..\build\Build.bat - ..\build\build.csproj = ..\build\build.csproj - ..\build\build35.bat = ..\build\build35.bat - ..\build\BuildAll.bat = ..\build\BuildAll.bat - ..\build\BuildSilverlight2.bat = ..\build\BuildSilverlight2.bat - ..\build\Common.targets = ..\build\Common.targets - ..\build\GenerateCompletePackage.bat = ..\build\GenerateCompletePackage.bat - ..\build\GenerateReleasePackage.bat = ..\build\GenerateReleasePackage.bat - ..\build\RunBenchmarks.bat = ..\build\RunBenchmarks.bat - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_Silverlight2|Any CPU = Debug_Silverlight2|Any CPU - Debug|Any CPU = Debug|Any CPU - Release_Silverlight2|Any CPU = Release_Silverlight2|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU - {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU - {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU - {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU - {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU - {DD01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {DD01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {DD01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU - {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.Build.0 = Release|Any CPU - {C268DA4C-4004-47DA-AF23-44C983281A68}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {C268DA4C-4004-47DA-AF23-44C983281A68}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C268DA4C-4004-47DA-AF23-44C983281A68}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {C268DA4C-4004-47DA-AF23-44C983281A68}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.Build.0 = Release|Any CPU - {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.Build.0 = Release|Any CPU - {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.Build.0 = Release|Any CPU - {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.Build.0 = Release|Any CPU - {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.Build.0 = Release|Any CPU - {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU - {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU - {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU - {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU - {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU - {EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU - {EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU - {EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU - {EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU - {EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU - {EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {C8D3015A-EA39-4F03-AEEC-3FF1F2087A12} = {1F896D5C-5FC2-4671-9216-781CB8187EC7} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C-5FC2-4671-9216-781CB8187EC7}" + ProjectSection(SolutionItems) = preProject + ..\protos\tutorial\addressbook.proto = ..\protos\tutorial\addressbook.proto + ..\protos\google\protobuf\csharp_options.proto = ..\protos\google\protobuf\csharp_options.proto + ..\protos\google\protobuf\descriptor.proto = ..\protos\google\protobuf\descriptor.proto + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8D3015A-EA39-4F03-AEEC-3FF1F2087A12}" + ProjectSection(SolutionItems) = preProject + ..\protos\google\protobuf\unittest.proto = ..\protos\google\protobuf\unittest.proto + ..\protos\google\protobuf\unittest_csharp_options.proto = ..\protos\google\protobuf\unittest_csharp_options.proto + ..\protos\google\protobuf\unittest_custom_options.proto = ..\protos\google\protobuf\unittest_custom_options.proto + ..\protos\google\protobuf\unittest_embed_optimize_for.proto = ..\protos\google\protobuf\unittest_embed_optimize_for.proto + ..\protos\google\protobuf\unittest_empty.proto = ..\protos\google\protobuf\unittest_empty.proto + ..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto + ..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto + ..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto + ..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto + ..\protos\google\protobuf\unittest_lite.proto = ..\protos\google\protobuf\unittest_lite.proto + ..\protos\google\protobuf\unittest_lite_imports_nonlite.proto = ..\protos\google\protobuf\unittest_lite_imports_nonlite.proto + ..\protos\google\protobuf\unittest_mset.proto = ..\protos\google\protobuf\unittest_mset.proto + ..\protos\google\protobuf\unittest_no_generic_services.proto = ..\protos\google\protobuf\unittest_no_generic_services.proto + ..\protos\google\protobuf\unittest_optimize_for.proto = ..\protos\google\protobuf\unittest_optimize_for.proto + ..\protos\extest\unittest_rpc_interop.proto = ..\protos\extest\unittest_rpc_interop.proto + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffers", "ProtocolBuffers\ProtocolBuffers.csproj", "{6908BDCE-D925-43F3-94AC-A531E6DF2591}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffers.Test", "ProtocolBuffers.Test\ProtocolBuffers.Test.csproj", "{DD01ED24-3750-4567-9A23-1DB676A15610}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoGen", "ProtoGen\ProtoGen.csproj", "{250ADE34-82FD-4BAE-86D5-985FBE589C4A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoGen.Test", "ProtoGen.Test\ProtoGen.Test.csproj", "{C268DA4C-4004-47DA-AF23-44C983281A68}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddressBook", "AddressBook\AddressBook.csproj", "{A31F5FB2-4FF3-432A-B35B-5CD203606311}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoMunge", "ProtoMunge\ProtoMunge.csproj", "{8F09AF72-3327-4FA7-BC09-070B80221AB9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoBench", "ProtoBench\ProtoBench.csproj", "{C7A4A435-2813-41C8-AA87-BD914BA5223D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoDump", "ProtoDump\ProtoDump.csproj", "{D7282E99-2DC3-405B-946F-177DB2FD2AE2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLite", "ProtocolBuffers\ProtocolBuffersLite.csproj", "{6969BDCE-D925-43F3-94AC-A531E6DF2591}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLite.Test", "ProtocolBuffersLite.Test\ProtocolBuffersLite.Test.csproj", "{EE01ED24-3750-4567-9A23-1DB676A15610}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLiteMixed.Test", "ProtocolBuffersLite.Test\ProtocolBuffersLiteMixed.Test.csproj", "{EEFFED24-3750-4567-9A23-1DB676A15610}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{66ED1950-AD27-42D7-88F8-94355AEC8225}" + ProjectSection(SolutionItems) = preProject + ..\build\Build.bat = ..\build\Build.bat + ..\build\build.csproj = ..\build\build.csproj + ..\build\build35.bat = ..\build\build35.bat + ..\build\BuildAll.bat = ..\build\BuildAll.bat + ..\build\BuildSilverlight2.bat = ..\build\BuildSilverlight2.bat + ..\build\Common.targets = ..\build\Common.targets + ..\build\GenerateCompletePackage.bat = ..\build\GenerateCompletePackage.bat + ..\build\GenerateReleasePackage.bat = ..\build\GenerateReleasePackage.bat + ..\build\RunBenchmarks.bat = ..\build\RunBenchmarks.bat + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_Silverlight2|Any CPU = Debug_Silverlight2|Any CPU + Debug|Any CPU = Debug|Any CPU + Release_Silverlight2|Any CPU = Release_Silverlight2|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU + {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU + {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU + {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU + {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU + {DD01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {DD01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {DD01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU + {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.Build.0 = Release|Any CPU + {C268DA4C-4004-47DA-AF23-44C983281A68}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {C268DA4C-4004-47DA-AF23-44C983281A68}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C268DA4C-4004-47DA-AF23-44C983281A68}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {C268DA4C-4004-47DA-AF23-44C983281A68}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.Build.0 = Release|Any CPU + {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.Build.0 = Release|Any CPU + {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.Build.0 = Release|Any CPU + {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.Build.0 = Release|Any CPU + {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.Build.0 = Release|Any CPU + {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU + {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU + {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU + {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU + {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU + {EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU + {EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU + {EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU + {EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU + {EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU + {EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {C8D3015A-EA39-4F03-AEEC-3FF1F2087A12} = {1F896D5C-5FC2-4671-9216-781CB8187EC7} + EndGlobalSection +EndGlobal -- cgit v1.2.3