parent
794409b379
commit
cabd06d12f
19 changed files with 1086 additions and 261 deletions
@ -0,0 +1,16 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
|
||||
using pb = global::Google.ProtocolBuffers; |
||||
using pbc = global::Google.ProtocolBuffers.Collections; |
||||
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||
using scg = global::System.Collections.Generic; |
||||
using self = global::Google.ProtocolBuffers.TestProtos; |
||||
|
||||
namespace Google.ProtocolBuffers.TestProtos { |
||||
|
||||
public enum EnumWithNoOuter { |
||||
FOO = 1, |
||||
BAR = 2, |
||||
} |
||||
|
||||
} |
@ -0,0 +1,395 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
|
||||
using pb = global::Google.ProtocolBuffers; |
||||
using pbc = global::Google.ProtocolBuffers.Collections; |
||||
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||
using scg = global::System.Collections.Generic; |
||||
using self = global::Google.ProtocolBuffers.TestProtos; |
||||
|
||||
namespace Google.ProtocolBuffers.TestProtos { |
||||
|
||||
public sealed partial class MessageWithNoOuter : pb::GeneratedMessage<MessageWithNoOuter, MessageWithNoOuter.Builder> { |
||||
private static readonly MessageWithNoOuter defaultInstance = new MessageWithNoOuter(); |
||||
public static MessageWithNoOuter DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override MessageWithNoOuter DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return self::MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { |
||||
get { return self::MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter__FieldAccessorTable; } |
||||
} |
||||
|
||||
#region Nested types |
||||
public static class Types { |
||||
public enum NestedEnum { |
||||
BAZ = 3, |
||||
} |
||||
|
||||
public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> { |
||||
private static readonly NestedMessage defaultInstance = new NestedMessage(); |
||||
public static NestedMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override NestedMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return self::MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { |
||||
get { return self::MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
// optional int32 i = 1; |
||||
private bool hasI; |
||||
private int i_ = 0; |
||||
public bool HasI { |
||||
get { return hasI; } |
||||
} |
||||
public int I { |
||||
get { return i_; } |
||||
} |
||||
|
||||
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::ByteString data, |
||||
pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) |
||||
.BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(byte[] data, |
||||
pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) |
||||
.BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom( |
||||
global::System.IO.Stream input, |
||||
pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) |
||||
.BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::CodedInputStream input, |
||||
pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) |
||||
.BuildParsed(); |
||||
} |
||||
|
||||
public static Builder CreateBuilder() { return new Builder(); } |
||||
public override IBuilder<self::MessageWithNoOuter.Types.NestedMessage> CreateBuilderForType() { return new Builder(); } |
||||
public static Builder CreateBuilder(self::MessageWithNoOuter.Types.NestedMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<self::MessageWithNoOuter.Types.NestedMessage, Builder> { |
||||
// Construct using self::MessageWithNoOuter.Types.NestedMessage.CreateBuilder() |
||||
internal Builder() {} |
||||
|
||||
self::MessageWithNoOuter.Types.NestedMessage result = new self::MessageWithNoOuter.Types.NestedMessage(); |
||||
|
||||
protected override self::MessageWithNoOuter.Types.NestedMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override IBuilder<self::MessageWithNoOuter.Types.NestedMessage> Clear() { |
||||
result = new self::MessageWithNoOuter.Types.NestedMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override IBuilder<self::MessageWithNoOuter.Types.NestedMessage> Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return self::MessageWithNoOuter.Types.NestedMessage.Descriptor; } |
||||
} |
||||
|
||||
public override self::MessageWithNoOuter.Types.NestedMessage DefaultInstanceForType { |
||||
get { return self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override self::MessageWithNoOuter.Types.NestedMessage BuildPartial() { |
||||
self::MessageWithNoOuter.Types.NestedMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
|
||||
// optional int32 i = 1; |
||||
public bool HasI { |
||||
get { return result.HasI; } |
||||
} |
||||
public int I { |
||||
get { return result.I; } |
||||
set { SetI(value); } |
||||
} |
||||
public Builder SetI(int value) { |
||||
result.hasI = true; |
||||
result.i_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearI() { |
||||
result.hasI = false; |
||||
result.i_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
#endregion |
||||
|
||||
// optional .protobuf_unittest.MessageWithNoOuter.NestedMessage nested = 1; |
||||
private bool hasNested; |
||||
private self::MessageWithNoOuter.Types.NestedMessage nested_ = self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance; |
||||
public bool HasNested { |
||||
get { return hasNested; } |
||||
} |
||||
public self::MessageWithNoOuter.Types.NestedMessage Nested { |
||||
get { return nested_; } |
||||
} |
||||
|
||||
// repeated .protobuf_unittest.TestAllTypes foreign = 2; |
||||
private scg::IList<self::TestAllTypes> foreign_ = pbc::Lists<self::TestAllTypes>.Empty; |
||||
public scg::IList<self::TestAllTypes> ForeignList { |
||||
get { return foreign_; } |
||||
} |
||||
public int ForeignCount |
||||
{ get { return foreign_.Count; } |
||||
} |
||||
public self::TestAllTypes GetForeign(int index) { |
||||
return foreign_ [index]; |
||||
} |
||||
|
||||
// optional .protobuf_unittest.MessageWithNoOuter.NestedEnum nested_enum = 3; |
||||
private bool hasNestedEnum; |
||||
private self::MessageWithNoOuter.Types.NestedEnum nestedEnum_ = self::MessageWithNoOuter.Types.NestedEnum.BAZ; |
||||
public bool HasNestedEnum { |
||||
get { return hasNestedEnum; } |
||||
} |
||||
public self::MessageWithNoOuter.Types.NestedEnum NestedEnum { get { return nestedEnum_; }} |
||||
|
||||
// optional .protobuf_unittest.EnumWithNoOuter foreign_enum = 4; |
||||
private bool hasForeignEnum; |
||||
private self::EnumWithNoOuter foreignEnum_ = self::EnumWithNoOuter.FOO; |
||||
public bool HasForeignEnum { |
||||
get { return hasForeignEnum; } |
||||
} |
||||
public self::EnumWithNoOuter ForeignEnum { get { return foreignEnum_; }} |
||||
|
||||
public static self::MessageWithNoOuter ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter ParseFrom(pb::ByteString data, |
||||
pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) |
||||
.BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter ParseFrom(byte[] data, |
||||
pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) |
||||
.BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter ParseFrom( |
||||
global::System.IO.Stream input, |
||||
pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) |
||||
.BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static self::MessageWithNoOuter ParseFrom(pb::CodedInputStream input, |
||||
pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) |
||||
.BuildParsed(); |
||||
} |
||||
|
||||
public static Builder CreateBuilder() { return new Builder(); } |
||||
public override IBuilder<self::MessageWithNoOuter> CreateBuilderForType() { return new Builder(); } |
||||
public static Builder CreateBuilder(self::MessageWithNoOuter prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<self::MessageWithNoOuter, Builder> { |
||||
// Construct using self::MessageWithNoOuter.CreateBuilder() |
||||
internal Builder() {} |
||||
|
||||
self::MessageWithNoOuter result = new self::MessageWithNoOuter(); |
||||
|
||||
protected override self::MessageWithNoOuter MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override IBuilder<self::MessageWithNoOuter> Clear() { |
||||
result = new self::MessageWithNoOuter(); |
||||
return this; |
||||
} |
||||
|
||||
public override IBuilder<self::MessageWithNoOuter> Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return self::MessageWithNoOuter.Descriptor; } |
||||
} |
||||
|
||||
public override self::MessageWithNoOuter DefaultInstanceForType { |
||||
get { return self::MessageWithNoOuter.DefaultInstance; } |
||||
} |
||||
|
||||
public override self::MessageWithNoOuter BuildPartial() { |
||||
if (result.foreign_ != pbc::Lists<self::TestAllTypes>.Empty) { |
||||
result.foreign_ = pbc::Lists<self::TestAllTypes>.AsReadOnly(result.foreign_); |
||||
} |
||||
self::MessageWithNoOuter returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
|
||||
// optional .protobuf_unittest.MessageWithNoOuter.NestedMessage nested = 1; |
||||
public bool HasNested { |
||||
get { return result.HasNested; } |
||||
} |
||||
public self::MessageWithNoOuter.Types.NestedMessage Nested { |
||||
get { return result.Nested; } |
||||
set { SetNested(value); } |
||||
} |
||||
public Builder SetNested(self::MessageWithNoOuter.Types.NestedMessage value) { |
||||
result.hasNested = true; |
||||
result.nested_ = value; |
||||
return this; |
||||
} |
||||
public Builder SetNested(self::MessageWithNoOuter.Types.NestedMessage.Builder builderForValue) { |
||||
result.hasNested = true; |
||||
result.nested_ = builderForValue.Build(); |
||||
return this; |
||||
} |
||||
public Builder MergeNested(self::MessageWithNoOuter.Types.NestedMessage value) { |
||||
if (result.HasNested && |
||||
result.nested_ != self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance) { |
||||
result.nested_ = |
||||
self::MessageWithNoOuter.Types.NestedMessage.CreateBuilder(result.nested_).MergeFrom(value).BuildPartial(); |
||||
} else { |
||||
result.nested_ = value; |
||||
} |
||||
result.hasNested = true; |
||||
return this; |
||||
} |
||||
public Builder ClearNested() { |
||||
result.hasNested = false; |
||||
result.nested_ = self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance; |
||||
return this; |
||||
} |
||||
|
||||
// repeated .protobuf_unittest.TestAllTypes foreign = 2; |
||||
public scg::IList<self::TestAllTypes> ForeignList { |
||||
get { return pbc::Lists.AsReadOnly(result.foreign_); } |
||||
} |
||||
public int ForeignCount { |
||||
get { return result.ForeignCount; } |
||||
} |
||||
public self::TestAllTypes GetForeign(int index) { |
||||
return result.GetForeign(index); |
||||
} |
||||
public Builder SetForeign(int index, self::TestAllTypes value) { |
||||
result.foreign_[index] = value; |
||||
return this; |
||||
} |
||||
public Builder SetForeign(int index, self::TestAllTypes.Builder builderForValue) { |
||||
result.foreign_[index] = builderForValue.Build(); |
||||
return this; |
||||
} |
||||
public Builder AddForeign(self::TestAllTypes value) { |
||||
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) { |
||||
result.foreign_ = new scg::List<self::TestAllTypes>(); |
||||
} |
||||
result.foreign_.Add(value); |
||||
return this; |
||||
} |
||||
public Builder AddForeign(self::TestAllTypes.Builder builderForValue) { |
||||
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) { |
||||
result.foreign_ = new scg::List<self::TestAllTypes>(); |
||||
} |
||||
result.foreign_.Add(builderForValue.Build()); |
||||
return this; |
||||
} |
||||
public Builder AddRangeForeign(scg::IEnumerable<self::TestAllTypes> values) { |
||||
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) { |
||||
result.foreign_ = new scg::List<self::TestAllTypes>(); |
||||
} |
||||
base.AddRange(values, result.foreign_); |
||||
return this; |
||||
} |
||||
public Builder ClearForeign() { |
||||
result.foreign_ = pbc::Lists<self::TestAllTypes>.Empty; |
||||
return this; |
||||
} |
||||
|
||||
// optional .protobuf_unittest.MessageWithNoOuter.NestedEnum nested_enum = 3; |
||||
public bool HasNestedEnum { |
||||
get { return result.HasNestedEnum; } |
||||
} |
||||
public self::MessageWithNoOuter.Types.NestedEnum NestedEnum { |
||||
get { return result.NestedEnum; } |
||||
set { SetNestedEnum(value); } |
||||
} |
||||
public Builder SetNestedEnum(self::MessageWithNoOuter.Types.NestedEnum value) { |
||||
result.hasNestedEnum = true; |
||||
result.nestedEnum_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearNestedEnum() { |
||||
result.hasNestedEnum = false; |
||||
result.nestedEnum_ = self::MessageWithNoOuter.Types.NestedEnum.BAZ; |
||||
return this; |
||||
} |
||||
|
||||
// optional .protobuf_unittest.EnumWithNoOuter foreign_enum = 4; |
||||
public bool HasForeignEnum { |
||||
get { return result.HasForeignEnum; } |
||||
} |
||||
public self::EnumWithNoOuter ForeignEnum { |
||||
get { return result.ForeignEnum; } |
||||
set { SetForeignEnum(value); } |
||||
} |
||||
public Builder SetForeignEnum(self::EnumWithNoOuter value) { |
||||
result.hasForeignEnum = true; |
||||
result.foreignEnum_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearForeignEnum() { |
||||
result.hasForeignEnum = false; |
||||
result.foreignEnum_ = self::EnumWithNoOuter.FOO; |
||||
return this; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,85 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
|
||||
using pb = global::Google.ProtocolBuffers; |
||||
using pbc = global::Google.ProtocolBuffers.Collections; |
||||
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||
using scg = global::System.Collections.Generic; |
||||
using self = global::Google.ProtocolBuffers.TestProtos; |
||||
|
||||
namespace Google.ProtocolBuffers.TestProtos { |
||||
|
||||
public static partial class MultiFileProto { |
||||
|
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static readonly pbd::FileDescriptor descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom ( |
||||
new byte[] { |
||||
0x0a, 0x3b, 0x73, 0x72, 0x63, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x2f, |
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x6d, 0x75, 0x6c, 0x74, |
||||
0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, |
||||
0x6f, 0x12, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, |
||||
0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x75, 0x6e, |
||||
0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, 0x02, 0x0a, 0x12, 0x4d, 0x65, 0x73, |
||||
0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x06, 0x6e, |
||||
0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, |
||||
0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, |
||||
0x69, 0x74, 0x68, 0x4e, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, |
||||
0x73, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, |
||||
0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, |
||||
0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6e, 0x65, |
||||
0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x70, 0x72, |
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, |
||||
0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, |
||||
0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x38, 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x65, 0x6e, 0x75, |
||||
0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, |
||||
0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x4f, 0x75, |
||||
0x74, 0x65, 0x72, 0x1a, 0x1a, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, |
||||
0x12, 0x09, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x22, 0x15, 0x0a, 0x0a, 0x4e, 0x65, 0x73, 0x74, 0x65, |
||||
0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x41, 0x5a, 0x10, 0x03, 0x2a, 0x23, 0x0a, 0x0f, 0x45, 0x6e, |
||||
0x75, 0x6d, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x4f, 0x4f, |
||||
0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x41, 0x52, 0x10, 0x02, 0x32, 0x63, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x69, |
||||
0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x03, 0x46, 0x6f, 0x6f, |
||||
0x12, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, |
||||
0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x1a, |
||||
0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, |
||||
0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x44, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, |
||||
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x70, |
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, |
||||
0x74, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0xad, 0x4b, 0x20, 0x01, |
||||
0x28, 0x05, 0x42, 0x58, 0x42, 0x16, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x54, |
||||
0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xc2, 0x3e, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, |
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x65, 0x73, 0x74, |
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xca, 0x3e, 0x0e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x72, |
||||
0x6f, 0x74, 0x6f, 0xd0, 0x3e, 0x01, 0xd8, 0x3e, 0x00, 0xe0, 0x3e, 0x01, |
||||
}, new pbd::FileDescriptor[] { |
||||
self::UnitTestProtoFile.Descriptor, |
||||
}); |
||||
#endregion |
||||
|
||||
#region Extensions |
||||
public static readonly pb::GeneratedExtensionBase<self::TestAllExtensions, int> ExtensionWithOuter = |
||||
pb::GeneratedSingleExtension<self::TestAllExtensions, int>.CreateInstance(Descriptor.Extensions[0]); |
||||
#endregion |
||||
|
||||
#region Static variables |
||||
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor |
||||
= Descriptor.MessageTypes[0]; |
||||
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_MessageWithNoOuter__FieldAccessorTable |
||||
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor, |
||||
new string[] { "Nested", "Foreign", "NestedEnum", "ForeignEnum", }, |
||||
typeof (self::MessageWithNoOuter), |
||||
typeof (self::MessageWithNoOuter.Builder)); |
||||
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor |
||||
= internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor.NestedTypes[0]; |
||||
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__FieldAccessorTable |
||||
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor, |
||||
new string[] { "I", }, |
||||
typeof (self::MessageWithNoOuter.Types.NestedMessage), |
||||
typeof (self::MessageWithNoOuter.Types.NestedMessage.Builder)); |
||||
#endregion |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,103 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
|
||||
using pb = global::Google.ProtocolBuffers; |
||||
using pbc = global::Google.ProtocolBuffers.Collections; |
||||
using pbd = global::Google.ProtocolBuffers.Descriptors; |
||||
using scg = global::System.Collections.Generic; |
||||
using self = global::Google.ProtocolBuffers.TestProtos; |
||||
|
||||
namespace Google.ProtocolBuffers.TestProtos { |
||||
|
||||
public abstract class ServiceWithNoOuter : pb::IService { |
||||
public abstract void Foo( |
||||
pb::IRpcController controller, |
||||
self::MessageWithNoOuter request, |
||||
global::System.Action<self::TestAllTypes> done); |
||||
|
||||
public static pbd::ServiceDescriptor Descriptor { |
||||
get { return self::MultiFileProto.Descriptor.Services[0]; } |
||||
} |
||||
public pbd::ServiceDescriptor DescriptorForType { |
||||
get { return Descriptor; } |
||||
} |
||||
|
||||
public void CallMethod( |
||||
pbd::MethodDescriptor method, |
||||
pb::IRpcController controller, |
||||
pb::IMessage request, |
||||
global::System.Action<pb::IMessage> done) { |
||||
if (method.Service != Descriptor) { |
||||
throw new global::System.ArgumentException( |
||||
"Service.CallMethod() given method descriptor for wrong " + |
||||
"service type."); |
||||
} |
||||
switch(method.Index) { |
||||
case 0: |
||||
this.Foo(controller, (self::MessageWithNoOuter)request, |
||||
pb::RpcUtil.SpecializeCallback<self::TestAllTypes>( |
||||
done)); |
||||
return; |
||||
default: |
||||
throw new global::System.InvalidOperationException("Can't get here."); |
||||
} |
||||
} |
||||
|
||||
public pb::IMessage GetRequestPrototype(pbd::MethodDescriptor method) { |
||||
if (method.Service != Descriptor) { |
||||
throw new global::System.ArgumentException( |
||||
"Service.GetRequestPrototype() given method " + |
||||
"descriptor for wrong service type."); |
||||
} |
||||
switch(method.Index) { |
||||
case 0: |
||||
return self::MessageWithNoOuter.DefaultInstance; |
||||
default: |
||||
throw new global::System.ArgumentException("Can't get here."); |
||||
} |
||||
} |
||||
|
||||
public pb::IMessage GetResponsePrototype(pbd::MethodDescriptor method) { |
||||
if (method.Service != Descriptor) { |
||||
throw new global::System.ArgumentException( |
||||
"Service.GetResponsePrototype() given method " + |
||||
"descriptor for wrong service type."); |
||||
} |
||||
switch(method.Index) { |
||||
case 0: |
||||
return self::TestAllTypes.DefaultInstance; |
||||
default: |
||||
throw new global::System.ArgumentException("Can't get here."); |
||||
} |
||||
} |
||||
|
||||
public static Stub CreateStub( |
||||
pb::IRpcChannel channel) { |
||||
return new Stub(channel); |
||||
} |
||||
|
||||
public class Stub : self::ServiceWithNoOuter { |
||||
internal Stub(pb::IRpcChannel channel) { |
||||
this.channel = channel; |
||||
} |
||||
|
||||
private readonly pb::IRpcChannel channel; |
||||
|
||||
public pb::IRpcChannel Channel { |
||||
get { return channel; } |
||||
} |
||||
|
||||
public override void Foo( |
||||
pb::IRpcController controller, |
||||
self::MessageWithNoOuter request, |
||||
global::System.Action<self::TestAllTypes> done) { |
||||
channel.CallMethod( |
||||
Descriptor.Methods[0], |
||||
controller, |
||||
request, |
||||
self::TestAllTypes.DefaultInstance, |
||||
pb::RpcUtil.GeneralizeCallback(done, self::TestAllTypes.DefaultInstance)); |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue