One-off patch to convert Unix line endings to Windows ones for generated source. Currently not sure why they ended up as Unix line endings after Git to Mercurial conversion, but we may need to tweak some repository settings.
parent
bf9821e074
commit
82bb0f1ef9
19 changed files with 64667 additions and 64667 deletions
File diff suppressed because it is too large
Load Diff
@ -1,356 +1,356 @@ |
||||
// 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 UnitTestCSharpOptionsProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OptionsMessage__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder> internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestCSharpOptionsProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3NoYXJwX29wdGlvbnMucHJv" + |
||||
"dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" + |
||||
"X29wdGlvbnMucHJvdG8iXgoOT3B0aW9uc01lc3NhZ2USDgoGbm9ybWFsGAEg" + |
||||
"ASgJEhcKD29wdGlvbnNfbWVzc2FnZRgCIAEoCRIjCgpjdXN0b21pemVkGAMg" + |
||||
"ASgJQg/CPgwKCkN1c3RvbU5hbWVCRsI+QwohR29vZ2xlLlByb3RvY29sQnVm" + |
||||
"ZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdENTaGFycE9wdGlvbnNQcm90b0Zp" + |
||||
"bGU="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_protobuf_unittest_OptionsMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder>(internal__static_protobuf_unittest_OptionsMessage__Descriptor, |
||||
new string[] { "Normal", "OptionsMessage_", "CustomName", }); |
||||
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 OptionsMessage : pb::GeneratedMessage<OptionsMessage, OptionsMessage.Builder> { |
||||
private static readonly OptionsMessage defaultInstance = new Builder().BuildPartial(); |
||||
public static OptionsMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override OptionsMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override OptionsMessage ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<OptionsMessage, OptionsMessage.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int NormalFieldNumber = 1; |
||||
private bool hasNormal; |
||||
private string normal_ = ""; |
||||
public bool HasNormal { |
||||
get { return hasNormal; } |
||||
} |
||||
public string Normal { |
||||
get { return normal_; } |
||||
} |
||||
|
||||
public const int OptionsMessage_FieldNumber = 2; |
||||
private bool hasOptionsMessage_; |
||||
private string optionsMessage_ = ""; |
||||
public bool HasOptionsMessage_ { |
||||
get { return hasOptionsMessage_; } |
||||
} |
||||
public string OptionsMessage_ { |
||||
get { return optionsMessage_; } |
||||
} |
||||
|
||||
public const int CustomNameFieldNumber = 3; |
||||
private bool hasCustomName; |
||||
private string customized_ = ""; |
||||
public bool HasCustomName { |
||||
get { return hasCustomName; } |
||||
} |
||||
public string CustomName { |
||||
get { return customized_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasNormal) { |
||||
output.WriteString(1, Normal); |
||||
} |
||||
if (HasOptionsMessage_) { |
||||
output.WriteString(2, OptionsMessage_); |
||||
} |
||||
if (HasCustomName) { |
||||
output.WriteString(3, CustomName); |
||||
} |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasNormal) { |
||||
size += pb::CodedOutputStream.ComputeStringSize(1, Normal); |
||||
} |
||||
if (HasOptionsMessage_) { |
||||
size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_); |
||||
} |
||||
if (HasCustomName) { |
||||
size += pb::CodedOutputStream.ComputeStringSize(3, CustomName); |
||||
} |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static OptionsMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage 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(OptionsMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<OptionsMessage, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
OptionsMessage result = new OptionsMessage(); |
||||
|
||||
protected override OptionsMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new OptionsMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Descriptor; } |
||||
} |
||||
|
||||
public override OptionsMessage DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override OptionsMessage BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
OptionsMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is OptionsMessage) { |
||||
return MergeFrom((OptionsMessage) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(OptionsMessage other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance) return this; |
||||
if (other.HasNormal) { |
||||
Normal = other.Normal; |
||||
} |
||||
if (other.HasOptionsMessage_) { |
||||
OptionsMessage_ = other.OptionsMessage_; |
||||
} |
||||
if (other.HasCustomName) { |
||||
CustomName = other.CustomName; |
||||
} |
||||
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: { |
||||
Normal = input.ReadString(); |
||||
break; |
||||
} |
||||
case 18: { |
||||
OptionsMessage_ = input.ReadString(); |
||||
break; |
||||
} |
||||
case 26: { |
||||
CustomName = input.ReadString(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasNormal { |
||||
get { return result.HasNormal; } |
||||
} |
||||
public string Normal { |
||||
get { return result.Normal; } |
||||
set { SetNormal(value); } |
||||
} |
||||
public Builder SetNormal(string value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasNormal = true; |
||||
result.normal_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearNormal() { |
||||
result.hasNormal = false; |
||||
result.normal_ = ""; |
||||
return this; |
||||
} |
||||
|
||||
public bool HasOptionsMessage_ { |
||||
get { return result.HasOptionsMessage_; } |
||||
} |
||||
public string OptionsMessage_ { |
||||
get { return result.OptionsMessage_; } |
||||
set { SetOptionsMessage_(value); } |
||||
} |
||||
public Builder SetOptionsMessage_(string value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasOptionsMessage_ = true; |
||||
result.optionsMessage_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearOptionsMessage_() { |
||||
result.hasOptionsMessage_ = false; |
||||
result.optionsMessage_ = ""; |
||||
return this; |
||||
} |
||||
|
||||
public bool HasCustomName { |
||||
get { return result.HasCustomName; } |
||||
} |
||||
public string CustomName { |
||||
get { return result.CustomName; } |
||||
set { SetCustomName(value); } |
||||
} |
||||
public Builder SetCustomName(string value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasCustomName = true; |
||||
result.customized_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearCustomName() { |
||||
result.hasCustomName = false; |
||||
result.customized_ = ""; |
||||
return this; |
||||
} |
||||
} |
||||
static OptionsMessage() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
// 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 UnitTestCSharpOptionsProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OptionsMessage__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder> internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestCSharpOptionsProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3NoYXJwX29wdGlvbnMucHJv" + |
||||
"dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" + |
||||
"X29wdGlvbnMucHJvdG8iXgoOT3B0aW9uc01lc3NhZ2USDgoGbm9ybWFsGAEg" + |
||||
"ASgJEhcKD29wdGlvbnNfbWVzc2FnZRgCIAEoCRIjCgpjdXN0b21pemVkGAMg" + |
||||
"ASgJQg/CPgwKCkN1c3RvbU5hbWVCRsI+QwohR29vZ2xlLlByb3RvY29sQnVm" + |
||||
"ZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdENTaGFycE9wdGlvbnNQcm90b0Zp" + |
||||
"bGU="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_protobuf_unittest_OptionsMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder>(internal__static_protobuf_unittest_OptionsMessage__Descriptor, |
||||
new string[] { "Normal", "OptionsMessage_", "CustomName", }); |
||||
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 OptionsMessage : pb::GeneratedMessage<OptionsMessage, OptionsMessage.Builder> { |
||||
private static readonly OptionsMessage defaultInstance = new Builder().BuildPartial(); |
||||
public static OptionsMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override OptionsMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override OptionsMessage ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<OptionsMessage, OptionsMessage.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int NormalFieldNumber = 1; |
||||
private bool hasNormal; |
||||
private string normal_ = ""; |
||||
public bool HasNormal { |
||||
get { return hasNormal; } |
||||
} |
||||
public string Normal { |
||||
get { return normal_; } |
||||
} |
||||
|
||||
public const int OptionsMessage_FieldNumber = 2; |
||||
private bool hasOptionsMessage_; |
||||
private string optionsMessage_ = ""; |
||||
public bool HasOptionsMessage_ { |
||||
get { return hasOptionsMessage_; } |
||||
} |
||||
public string OptionsMessage_ { |
||||
get { return optionsMessage_; } |
||||
} |
||||
|
||||
public const int CustomNameFieldNumber = 3; |
||||
private bool hasCustomName; |
||||
private string customized_ = ""; |
||||
public bool HasCustomName { |
||||
get { return hasCustomName; } |
||||
} |
||||
public string CustomName { |
||||
get { return customized_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasNormal) { |
||||
output.WriteString(1, Normal); |
||||
} |
||||
if (HasOptionsMessage_) { |
||||
output.WriteString(2, OptionsMessage_); |
||||
} |
||||
if (HasCustomName) { |
||||
output.WriteString(3, CustomName); |
||||
} |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasNormal) { |
||||
size += pb::CodedOutputStream.ComputeStringSize(1, Normal); |
||||
} |
||||
if (HasOptionsMessage_) { |
||||
size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_); |
||||
} |
||||
if (HasCustomName) { |
||||
size += pb::CodedOutputStream.ComputeStringSize(3, CustomName); |
||||
} |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static OptionsMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static OptionsMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static OptionsMessage 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(OptionsMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<OptionsMessage, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
OptionsMessage result = new OptionsMessage(); |
||||
|
||||
protected override OptionsMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new OptionsMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Descriptor; } |
||||
} |
||||
|
||||
public override OptionsMessage DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override OptionsMessage BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
OptionsMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is OptionsMessage) { |
||||
return MergeFrom((OptionsMessage) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(OptionsMessage other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance) return this; |
||||
if (other.HasNormal) { |
||||
Normal = other.Normal; |
||||
} |
||||
if (other.HasOptionsMessage_) { |
||||
OptionsMessage_ = other.OptionsMessage_; |
||||
} |
||||
if (other.HasCustomName) { |
||||
CustomName = other.CustomName; |
||||
} |
||||
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: { |
||||
Normal = input.ReadString(); |
||||
break; |
||||
} |
||||
case 18: { |
||||
OptionsMessage_ = input.ReadString(); |
||||
break; |
||||
} |
||||
case 26: { |
||||
CustomName = input.ReadString(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasNormal { |
||||
get { return result.HasNormal; } |
||||
} |
||||
public string Normal { |
||||
get { return result.Normal; } |
||||
set { SetNormal(value); } |
||||
} |
||||
public Builder SetNormal(string value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasNormal = true; |
||||
result.normal_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearNormal() { |
||||
result.hasNormal = false; |
||||
result.normal_ = ""; |
||||
return this; |
||||
} |
||||
|
||||
public bool HasOptionsMessage_ { |
||||
get { return result.HasOptionsMessage_; } |
||||
} |
||||
public string OptionsMessage_ { |
||||
get { return result.OptionsMessage_; } |
||||
set { SetOptionsMessage_(value); } |
||||
} |
||||
public Builder SetOptionsMessage_(string value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasOptionsMessage_ = true; |
||||
result.optionsMessage_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearOptionsMessage_() { |
||||
result.hasOptionsMessage_ = false; |
||||
result.optionsMessage_ = ""; |
||||
return this; |
||||
} |
||||
|
||||
public bool HasCustomName { |
||||
get { return result.HasCustomName; } |
||||
} |
||||
public string CustomName { |
||||
get { return result.CustomName; } |
||||
set { SetCustomName(value); } |
||||
} |
||||
public Builder SetCustomName(string value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasCustomName = true; |
||||
result.customized_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearCustomName() { |
||||
result.hasCustomName = false; |
||||
result.customized_ = ""; |
||||
return this; |
||||
} |
||||
} |
||||
static OptionsMessage() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,370 +1,370 @@ |
||||
// 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 UnitTestEmbedOptimizeForProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder> internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestEmbedOptimizeForProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CjFnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1iZWRfb3B0aW1pemVfZm9y" + |
||||
"LnByb3RvEhFwcm90b2J1Zl91bml0dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2Nz" + |
||||
"aGFycF9vcHRpb25zLnByb3RvGitnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rf" + |
||||
"b3B0aW1pemVfZm9yLnByb3RvIqEBChlUZXN0RW1iZWRPcHRpbWl6ZWRGb3JT" + |
||||
"aXplEkEKEG9wdGlvbmFsX21lc3NhZ2UYASABKAsyJy5wcm90b2J1Zl91bml0" + |
||||
"dGVzdC5UZXN0T3B0aW1pemVkRm9yU2l6ZRJBChByZXBlYXRlZF9tZXNzYWdl" + |
||||
"GAIgAygLMicucHJvdG9idWZfdW5pdHRlc3QuVGVzdE9wdGltaXplZEZvclNp" + |
||||
"emVCS0gBwj5GCiFHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MS" + |
||||
"IVVuaXRUZXN0RW1iZWRPcHRpbWl6ZUZvclByb3RvRmlsZQ=="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder>(internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor, |
||||
new string[] { "OptionalMessage", "RepeatedMessage", }); |
||||
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); |
||||
RegisterAllExtensions(registry); |
||||
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); |
||||
global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.RegisterAllExtensions(registry); |
||||
return registry; |
||||
}; |
||||
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
||||
new pbd::FileDescriptor[] { |
||||
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, |
||||
global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.Descriptor, |
||||
}, assigner); |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
#region Messages |
||||
public sealed partial class TestEmbedOptimizedForSize : pb::GeneratedMessage<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> { |
||||
private static readonly TestEmbedOptimizedForSize defaultInstance = new Builder().BuildPartial(); |
||||
public static TestEmbedOptimizedForSize DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override TestEmbedOptimizedForSize DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override TestEmbedOptimizedForSize ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int OptionalMessageFieldNumber = 1; |
||||
private bool hasOptionalMessage; |
||||
private global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; |
||||
public bool HasOptionalMessage { |
||||
get { return hasOptionalMessage; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage { |
||||
get { return optionalMessage_; } |
||||
} |
||||
|
||||
public const int RepeatedMessageFieldNumber = 2; |
||||
private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> repeatedMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>(); |
||||
public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList { |
||||
get { return repeatedMessage_; } |
||||
} |
||||
public int RepeatedMessageCount { |
||||
get { return repeatedMessage_.Count; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) { |
||||
return repeatedMessage_[index]; |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
if (HasOptionalMessage) { |
||||
if (!OptionalMessage.IsInitialized) return false; |
||||
} |
||||
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { |
||||
if (!element.IsInitialized) return false; |
||||
} |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasOptionalMessage) { |
||||
output.WriteMessage(1, OptionalMessage); |
||||
} |
||||
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { |
||||
output.WriteMessage(2, element); |
||||
} |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasOptionalMessage) { |
||||
size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage); |
||||
} |
||||
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { |
||||
size += pb::CodedOutputStream.ComputeMessageSize(2, element); |
||||
} |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize 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(TestEmbedOptimizedForSize prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<TestEmbedOptimizedForSize, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
TestEmbedOptimizedForSize result = new TestEmbedOptimizedForSize(); |
||||
|
||||
protected override TestEmbedOptimizedForSize MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new TestEmbedOptimizedForSize(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Descriptor; } |
||||
} |
||||
|
||||
public override TestEmbedOptimizedForSize DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance; } |
||||
} |
||||
|
||||
public override TestEmbedOptimizedForSize BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
result.repeatedMessage_.MakeReadOnly(); |
||||
TestEmbedOptimizedForSize returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is TestEmbedOptimizedForSize) { |
||||
return MergeFrom((TestEmbedOptimizedForSize) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(TestEmbedOptimizedForSize other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance) return this; |
||||
if (other.HasOptionalMessage) { |
||||
MergeOptionalMessage(other.OptionalMessage); |
||||
} |
||||
if (other.repeatedMessage_.Count != 0) { |
||||
base.AddRange(other.repeatedMessage_, result.repeatedMessage_); |
||||
} |
||||
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.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(); |
||||
if (HasOptionalMessage) { |
||||
subBuilder.MergeFrom(OptionalMessage); |
||||
} |
||||
input.ReadMessage(subBuilder, extensionRegistry); |
||||
OptionalMessage = subBuilder.BuildPartial(); |
||||
break; |
||||
} |
||||
case 18: { |
||||
global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(); |
||||
input.ReadMessage(subBuilder, extensionRegistry); |
||||
AddRepeatedMessage(subBuilder.BuildPartial()); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasOptionalMessage { |
||||
get { return result.HasOptionalMessage; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage { |
||||
get { return result.OptionalMessage; } |
||||
set { SetOptionalMessage(value); } |
||||
} |
||||
public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasOptionalMessage = true; |
||||
result.optionalMessage_ = value; |
||||
return this; |
||||
} |
||||
public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { |
||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||
result.hasOptionalMessage = true; |
||||
result.optionalMessage_ = builderForValue.Build(); |
||||
return this; |
||||
} |
||||
public Builder MergeOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
if (result.HasOptionalMessage && |
||||
result.optionalMessage_ != global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance) { |
||||
result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial(); |
||||
} else { |
||||
result.optionalMessage_ = value; |
||||
} |
||||
result.hasOptionalMessage = true; |
||||
return this; |
||||
} |
||||
public Builder ClearOptionalMessage() { |
||||
result.hasOptionalMessage = false; |
||||
result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; |
||||
return this; |
||||
} |
||||
|
||||
public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList { |
||||
get { return result.repeatedMessage_; } |
||||
} |
||||
public int RepeatedMessageCount { |
||||
get { return result.RepeatedMessageCount; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) { |
||||
return result.GetRepeatedMessage(index); |
||||
} |
||||
public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.repeatedMessage_[index] = value; |
||||
return this; |
||||
} |
||||
public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { |
||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||
result.repeatedMessage_[index] = builderForValue.Build(); |
||||
return this; |
||||
} |
||||
public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.repeatedMessage_.Add(value); |
||||
return this; |
||||
} |
||||
public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { |
||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||
result.repeatedMessage_.Add(builderForValue.Build()); |
||||
return this; |
||||
} |
||||
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> values) { |
||||
base.AddRange(values, result.repeatedMessage_); |
||||
return this; |
||||
} |
||||
public Builder ClearRepeatedMessage() { |
||||
result.repeatedMessage_.Clear(); |
||||
return this; |
||||
} |
||||
} |
||||
static TestEmbedOptimizedForSize() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
// 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 UnitTestEmbedOptimizeForProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder> internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestEmbedOptimizeForProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CjFnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1iZWRfb3B0aW1pemVfZm9y" + |
||||
"LnByb3RvEhFwcm90b2J1Zl91bml0dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2Nz" + |
||||
"aGFycF9vcHRpb25zLnByb3RvGitnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rf" + |
||||
"b3B0aW1pemVfZm9yLnByb3RvIqEBChlUZXN0RW1iZWRPcHRpbWl6ZWRGb3JT" + |
||||
"aXplEkEKEG9wdGlvbmFsX21lc3NhZ2UYASABKAsyJy5wcm90b2J1Zl91bml0" + |
||||
"dGVzdC5UZXN0T3B0aW1pemVkRm9yU2l6ZRJBChByZXBlYXRlZF9tZXNzYWdl" + |
||||
"GAIgAygLMicucHJvdG9idWZfdW5pdHRlc3QuVGVzdE9wdGltaXplZEZvclNp" + |
||||
"emVCS0gBwj5GCiFHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MS" + |
||||
"IVVuaXRUZXN0RW1iZWRPcHRpbWl6ZUZvclByb3RvRmlsZQ=="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder>(internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor, |
||||
new string[] { "OptionalMessage", "RepeatedMessage", }); |
||||
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); |
||||
RegisterAllExtensions(registry); |
||||
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); |
||||
global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.RegisterAllExtensions(registry); |
||||
return registry; |
||||
}; |
||||
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
||||
new pbd::FileDescriptor[] { |
||||
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, |
||||
global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.Descriptor, |
||||
}, assigner); |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
#region Messages |
||||
public sealed partial class TestEmbedOptimizedForSize : pb::GeneratedMessage<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> { |
||||
private static readonly TestEmbedOptimizedForSize defaultInstance = new Builder().BuildPartial(); |
||||
public static TestEmbedOptimizedForSize DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override TestEmbedOptimizedForSize DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override TestEmbedOptimizedForSize ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int OptionalMessageFieldNumber = 1; |
||||
private bool hasOptionalMessage; |
||||
private global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; |
||||
public bool HasOptionalMessage { |
||||
get { return hasOptionalMessage; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage { |
||||
get { return optionalMessage_; } |
||||
} |
||||
|
||||
public const int RepeatedMessageFieldNumber = 2; |
||||
private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> repeatedMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>(); |
||||
public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList { |
||||
get { return repeatedMessage_; } |
||||
} |
||||
public int RepeatedMessageCount { |
||||
get { return repeatedMessage_.Count; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) { |
||||
return repeatedMessage_[index]; |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
if (HasOptionalMessage) { |
||||
if (!OptionalMessage.IsInitialized) return false; |
||||
} |
||||
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { |
||||
if (!element.IsInitialized) return false; |
||||
} |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasOptionalMessage) { |
||||
output.WriteMessage(1, OptionalMessage); |
||||
} |
||||
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { |
||||
output.WriteMessage(2, element); |
||||
} |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasOptionalMessage) { |
||||
size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage); |
||||
} |
||||
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { |
||||
size += pb::CodedOutputStream.ComputeMessageSize(2, element); |
||||
} |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestEmbedOptimizedForSize 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(TestEmbedOptimizedForSize prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<TestEmbedOptimizedForSize, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
TestEmbedOptimizedForSize result = new TestEmbedOptimizedForSize(); |
||||
|
||||
protected override TestEmbedOptimizedForSize MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new TestEmbedOptimizedForSize(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Descriptor; } |
||||
} |
||||
|
||||
public override TestEmbedOptimizedForSize DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance; } |
||||
} |
||||
|
||||
public override TestEmbedOptimizedForSize BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
result.repeatedMessage_.MakeReadOnly(); |
||||
TestEmbedOptimizedForSize returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is TestEmbedOptimizedForSize) { |
||||
return MergeFrom((TestEmbedOptimizedForSize) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(TestEmbedOptimizedForSize other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance) return this; |
||||
if (other.HasOptionalMessage) { |
||||
MergeOptionalMessage(other.OptionalMessage); |
||||
} |
||||
if (other.repeatedMessage_.Count != 0) { |
||||
base.AddRange(other.repeatedMessage_, result.repeatedMessage_); |
||||
} |
||||
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.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(); |
||||
if (HasOptionalMessage) { |
||||
subBuilder.MergeFrom(OptionalMessage); |
||||
} |
||||
input.ReadMessage(subBuilder, extensionRegistry); |
||||
OptionalMessage = subBuilder.BuildPartial(); |
||||
break; |
||||
} |
||||
case 18: { |
||||
global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(); |
||||
input.ReadMessage(subBuilder, extensionRegistry); |
||||
AddRepeatedMessage(subBuilder.BuildPartial()); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasOptionalMessage { |
||||
get { return result.HasOptionalMessage; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage { |
||||
get { return result.OptionalMessage; } |
||||
set { SetOptionalMessage(value); } |
||||
} |
||||
public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasOptionalMessage = true; |
||||
result.optionalMessage_ = value; |
||||
return this; |
||||
} |
||||
public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { |
||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||
result.hasOptionalMessage = true; |
||||
result.optionalMessage_ = builderForValue.Build(); |
||||
return this; |
||||
} |
||||
public Builder MergeOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
if (result.HasOptionalMessage && |
||||
result.optionalMessage_ != global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance) { |
||||
result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial(); |
||||
} else { |
||||
result.optionalMessage_ = value; |
||||
} |
||||
result.hasOptionalMessage = true; |
||||
return this; |
||||
} |
||||
public Builder ClearOptionalMessage() { |
||||
result.hasOptionalMessage = false; |
||||
result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; |
||||
return this; |
||||
} |
||||
|
||||
public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList { |
||||
get { return result.repeatedMessage_; } |
||||
} |
||||
public int RepeatedMessageCount { |
||||
get { return result.RepeatedMessageCount; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) { |
||||
return result.GetRepeatedMessage(index); |
||||
} |
||||
public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.repeatedMessage_[index] = value; |
||||
return this; |
||||
} |
||||
public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { |
||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||
result.repeatedMessage_[index] = builderForValue.Build(); |
||||
return this; |
||||
} |
||||
public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.repeatedMessage_.Add(value); |
||||
return this; |
||||
} |
||||
public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { |
||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||
result.repeatedMessage_.Add(builderForValue.Build()); |
||||
return this; |
||||
} |
||||
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> values) { |
||||
base.AddRange(values, result.repeatedMessage_); |
||||
return this; |
||||
} |
||||
public Builder ClearRepeatedMessage() { |
||||
result.repeatedMessage_.Clear(); |
||||
return this; |
||||
} |
||||
} |
||||
static TestEmbedOptimizedForSize() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
|
@ -1,44 +1,44 @@ |
||||
// 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 UnitTestEmptyProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestEmptyProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CiRnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1wdHkucHJvdG8aJGdvb2ds" + |
||||
"ZS9wcm90b2J1Zi9jc2hhcnBfb3B0aW9ucy5wcm90b0I+wj47CiFHb29nbGUu" + |
||||
"UHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MSFlVuaXRUZXN0RW1wdHlQcm90" + |
||||
"b0ZpbGU="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
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 |
||||
|
||||
} |
||||
} |
||||
// 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 UnitTestEmptyProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestEmptyProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CiRnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1wdHkucHJvdG8aJGdvb2ds" + |
||||
"ZS9wcm90b2J1Zi9jc2hhcnBfb3B0aW9ucy5wcm90b0I+wj47CiFHb29nbGUu" + |
||||
"UHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MSFlVuaXRUZXN0RW1wdHlQcm90" + |
||||
"b0ZpbGU="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
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 |
||||
|
||||
} |
||||
} |
||||
|
@ -1,246 +1,246 @@ |
||||
// 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 UnitTestImportLiteProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
#endregion |
||||
#region Extensions |
||||
internal static readonly object Descriptor; |
||||
static UnitTestImportLiteProtoFile() { |
||||
Descriptor = null; |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
#region Enums |
||||
public enum ImportEnumLite { |
||||
IMPORT_LITE_FOO = 7, |
||||
IMPORT_LITE_BAR = 8, |
||||
IMPORT_LITE_BAZ = 9, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> { |
||||
private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial(); |
||||
public static ImportMessageLite DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessageLite DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override ImportMessageLite ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public const int DFieldNumber = 1; |
||||
private bool hasD; |
||||
private int d_ = 0; |
||||
public bool HasD { |
||||
get { return hasD; } |
||||
} |
||||
public int D { |
||||
get { return d_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasD) { |
||||
output.WriteInt32(1, D); |
||||
} |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasD) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, D); |
||||
} |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
#region Lite runtime methods |
||||
public override int GetHashCode() { |
||||
int hash = GetType().GetHashCode(); |
||||
if (hasD) hash ^= d_.GetHashCode(); |
||||
return hash; |
||||
} |
||||
|
||||
public override bool Equals(object obj) { |
||||
ImportMessageLite other = obj as ImportMessageLite; |
||||
if (other == null) return false; |
||||
if (hasD != other.hasD || (hasD && !d_.Equals(other.d_))) return false; |
||||
return true; |
||||
} |
||||
|
||||
public override void PrintTo(global::System.IO.TextWriter writer) { |
||||
PrintField("d", hasD, d_, writer); |
||||
} |
||||
#endregion |
||||
|
||||
public static ImportMessageLite ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite 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(ImportMessageLite prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
ImportMessageLite result = new ImportMessageLite(); |
||||
|
||||
protected override ImportMessageLite MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new ImportMessageLite(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override ImportMessageLite DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessageLite BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
ImportMessageLite returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessageLite other) { |
||||
if (other is ImportMessageLite) { |
||||
return MergeFrom((ImportMessageLite) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(ImportMessageLite other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance) return this; |
||||
if (other.HasD) { |
||||
D = other.D; |
||||
} |
||||
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) { |
||||
while (true) { |
||||
uint tag = input.ReadTag(); |
||||
switch (tag) { |
||||
case 0: { |
||||
return this; |
||||
} |
||||
default: { |
||||
if (pb::WireFormat.IsEndGroupTag(tag)) { |
||||
return this; |
||||
} |
||||
ParseUnknownField(input, extensionRegistry, tag); |
||||
break; |
||||
} |
||||
case 8: { |
||||
D = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasD { |
||||
get { return result.HasD; } |
||||
} |
||||
public int D { |
||||
get { return result.D; } |
||||
set { SetD(value); } |
||||
} |
||||
public Builder SetD(int value) { |
||||
result.hasD = true; |
||||
result.d_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearD() { |
||||
result.hasD = false; |
||||
result.d_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static ImportMessageLite() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
// 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 UnitTestImportLiteProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
#endregion |
||||
#region Extensions |
||||
internal static readonly object Descriptor; |
||||
static UnitTestImportLiteProtoFile() { |
||||
Descriptor = null; |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
#region Enums |
||||
public enum ImportEnumLite { |
||||
IMPORT_LITE_FOO = 7, |
||||
IMPORT_LITE_BAR = 8, |
||||
IMPORT_LITE_BAZ = 9, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> { |
||||
private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial(); |
||||
public static ImportMessageLite DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessageLite DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override ImportMessageLite ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public const int DFieldNumber = 1; |
||||
private bool hasD; |
||||
private int d_ = 0; |
||||
public bool HasD { |
||||
get { return hasD; } |
||||
} |
||||
public int D { |
||||
get { return d_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasD) { |
||||
output.WriteInt32(1, D); |
||||
} |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasD) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, D); |
||||
} |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
#region Lite runtime methods |
||||
public override int GetHashCode() { |
||||
int hash = GetType().GetHashCode(); |
||||
if (hasD) hash ^= d_.GetHashCode(); |
||||
return hash; |
||||
} |
||||
|
||||
public override bool Equals(object obj) { |
||||
ImportMessageLite other = obj as ImportMessageLite; |
||||
if (other == null) return false; |
||||
if (hasD != other.hasD || (hasD && !d_.Equals(other.d_))) return false; |
||||
return true; |
||||
} |
||||
|
||||
public override void PrintTo(global::System.IO.TextWriter writer) { |
||||
PrintField("d", hasD, d_, writer); |
||||
} |
||||
#endregion |
||||
|
||||
public static ImportMessageLite ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite 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(ImportMessageLite prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
ImportMessageLite result = new ImportMessageLite(); |
||||
|
||||
protected override ImportMessageLite MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new ImportMessageLite(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override ImportMessageLite DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessageLite BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
ImportMessageLite returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessageLite other) { |
||||
if (other is ImportMessageLite) { |
||||
return MergeFrom((ImportMessageLite) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(ImportMessageLite other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance) return this; |
||||
if (other.HasD) { |
||||
D = other.D; |
||||
} |
||||
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) { |
||||
while (true) { |
||||
uint tag = input.ReadTag(); |
||||
switch (tag) { |
||||
case 0: { |
||||
return this; |
||||
} |
||||
default: { |
||||
if (pb::WireFormat.IsEndGroupTag(tag)) { |
||||
return this; |
||||
} |
||||
ParseUnknownField(input, extensionRegistry, tag); |
||||
break; |
||||
} |
||||
case 8: { |
||||
D = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasD { |
||||
get { return result.HasD; } |
||||
} |
||||
public int D { |
||||
get { return result.D; } |
||||
set { SetD(value); } |
||||
} |
||||
public Builder SetD(int value) { |
||||
result.hasD = true; |
||||
result.d_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearD() { |
||||
result.hasD = false; |
||||
result.d_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static ImportMessageLite() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
|
@ -1,280 +1,280 @@ |
||||
// 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 UnitTestImportProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestImportProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" + |
||||
"b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" + |
||||
"b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" + |
||||
"SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" + |
||||
"CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" + |
||||
"PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" + |
||||
"dEltcG9ydFByb3RvRmlsZQ=="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor, |
||||
new string[] { "D", }); |
||||
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 Enums |
||||
public enum ImportEnum { |
||||
IMPORT_FOO = 7, |
||||
IMPORT_BAR = 8, |
||||
IMPORT_BAZ = 9, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> { |
||||
private static readonly ImportMessage defaultInstance = new Builder().BuildPartial(); |
||||
public static ImportMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override ImportMessage ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int DFieldNumber = 1; |
||||
private bool hasD; |
||||
private int d_ = 0; |
||||
public bool HasD { |
||||
get { return hasD; } |
||||
} |
||||
public int D { |
||||
get { return d_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasD) { |
||||
output.WriteInt32(1, D); |
||||
} |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasD) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, D); |
||||
} |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static ImportMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessage 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(ImportMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
ImportMessage result = new ImportMessage(); |
||||
|
||||
protected override ImportMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new ImportMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; } |
||||
} |
||||
|
||||
public override ImportMessage DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessage BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
ImportMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is ImportMessage) { |
||||
return MergeFrom((ImportMessage) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(ImportMessage other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this; |
||||
if (other.HasD) { |
||||
D = other.D; |
||||
} |
||||
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: { |
||||
D = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasD { |
||||
get { return result.HasD; } |
||||
} |
||||
public int D { |
||||
get { return result.D; } |
||||
set { SetD(value); } |
||||
} |
||||
public Builder SetD(int value) { |
||||
result.hasD = true; |
||||
result.d_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearD() { |
||||
result.hasD = false; |
||||
result.d_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static ImportMessage() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
// 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 UnitTestImportProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestImportProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" + |
||||
"b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" + |
||||
"b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" + |
||||
"SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" + |
||||
"CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" + |
||||
"PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" + |
||||
"dEltcG9ydFByb3RvRmlsZQ=="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor, |
||||
new string[] { "D", }); |
||||
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 Enums |
||||
public enum ImportEnum { |
||||
IMPORT_FOO = 7, |
||||
IMPORT_BAR = 8, |
||||
IMPORT_BAZ = 9, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> { |
||||
private static readonly ImportMessage defaultInstance = new Builder().BuildPartial(); |
||||
public static ImportMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override ImportMessage ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int DFieldNumber = 1; |
||||
private bool hasD; |
||||
private int d_ = 0; |
||||
public bool HasD { |
||||
get { return hasD; } |
||||
} |
||||
public int D { |
||||
get { return d_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasD) { |
||||
output.WriteInt32(1, D); |
||||
} |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasD) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, D); |
||||
} |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static ImportMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessage 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(ImportMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
ImportMessage result = new ImportMessage(); |
||||
|
||||
protected override ImportMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new ImportMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; } |
||||
} |
||||
|
||||
public override ImportMessage DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessage BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
ImportMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is ImportMessage) { |
||||
return MergeFrom((ImportMessage) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(ImportMessage other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this; |
||||
if (other.HasD) { |
||||
D = other.D; |
||||
} |
||||
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: { |
||||
D = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasD { |
||||
get { return result.HasD; } |
||||
} |
||||
public int D { |
||||
get { return result.D; } |
||||
set { SetD(value); } |
||||
} |
||||
public Builder SetD(int value) { |
||||
result.hasD = true; |
||||
result.d_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearD() { |
||||
result.hasD = false; |
||||
result.d_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static ImportMessage() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,382 +1,382 @@ |
||||
// 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.NoGenericService { |
||||
|
||||
public static partial class UnitTestNoGenericServicesProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
registry.Add(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension); |
||||
} |
||||
#endregion |
||||
#region Extensions |
||||
public const int TestExtensionFieldNumber = 1000; |
||||
public static pb::GeneratedExtensionBase<int> TestExtension; |
||||
#endregion |
||||
|
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder> internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestNoGenericServicesProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CjJnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rfbm9fZ2VuZXJpY19zZXJ2aWNl" + |
||||
"cy5wcm90bxIoZ29vZ2xlLnByb3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNf" + |
||||
"dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2NzaGFycF9vcHRpb25zLnByb3RvIiMK" + |
||||
"C1Rlc3RNZXNzYWdlEgkKAWEYASABKAUqCQjoBxCAgICAAioTCghUZXN0RW51" + |
||||
"bRIHCgNGT08QATKCAQoLVGVzdFNlcnZpY2UScwoDRm9vEjUuZ29vZ2xlLnBy" + |
||||
"b3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNfdGVzdC5UZXN0TWVzc2FnZRo1" + |
||||
"Lmdvb2dsZS5wcm90b2J1Zi5ub19nZW5lcmljX3NlcnZpY2VzX3Rlc3QuVGVz" + |
||||
"dE1lc3NhZ2U6TgoOdGVzdF9leHRlbnNpb24SNS5nb29nbGUucHJvdG9idWYu" + |
||||
"bm9fZ2VuZXJpY19zZXJ2aWNlc190ZXN0LlRlc3RNZXNzYWdlGOgHIAEoBUJk" + |
||||
"gAEAiAEAkAEAwj5YCjJHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90" + |
||||
"b3MuTm9HZW5lcmljU2VydmljZRIiVW5pdFRlc3ROb0dlbmVyaWNTZXJ2aWNl" + |
||||
"c1Byb3RvRmlsZQ=="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor, |
||||
new string[] { "A", }); |
||||
global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor.Extensions[0]); |
||||
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 Enums |
||||
public enum TestEnum { |
||||
FOO = 1, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class TestMessage : pb::ExtendableMessage<TestMessage, TestMessage.Builder> { |
||||
private static readonly TestMessage defaultInstance = new Builder().BuildPartial(); |
||||
public static TestMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override TestMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override TestMessage ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<TestMessage, TestMessage.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int AFieldNumber = 1; |
||||
private bool hasA; |
||||
private int a_ = 0; |
||||
public bool HasA { |
||||
get { return hasA; } |
||||
} |
||||
public int A { |
||||
get { return a_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
if (!ExtensionsAreInitialized) return false; |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
pb::ExtendableMessage<TestMessage, TestMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); |
||||
if (HasA) { |
||||
output.WriteInt32(1, A); |
||||
} |
||||
extensionWriter.WriteUntil(536870912, output); |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasA) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, A); |
||||
} |
||||
size += ExtensionsSerializedSize; |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static TestMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestMessage 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(TestMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::ExtendableBuilder<TestMessage, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
TestMessage result = new TestMessage(); |
||||
|
||||
protected override TestMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new TestMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Descriptor; } |
||||
} |
||||
|
||||
public override TestMessage DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override TestMessage BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
TestMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is TestMessage) { |
||||
return MergeFrom((TestMessage) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(TestMessage other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance) return this; |
||||
if (other.HasA) { |
||||
A = other.A; |
||||
} |
||||
this.MergeExtensionFields(other); |
||||
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: { |
||||
A = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasA { |
||||
get { return result.HasA; } |
||||
} |
||||
public int A { |
||||
get { return result.A; } |
||||
set { SetA(value); } |
||||
} |
||||
public Builder SetA(int value) { |
||||
result.hasA = true; |
||||
result.a_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearA() { |
||||
result.hasA = false; |
||||
result.a_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static TestMessage() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Services |
||||
public abstract class TestService : pb::IService { |
||||
public abstract void Foo( |
||||
pb::IRpcController controller, |
||||
global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request, |
||||
global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done); |
||||
|
||||
public static pbd::ServiceDescriptor Descriptor { |
||||
get { return UnitTestNoGenericServicesProtoFile.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, (global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage) request, |
||||
pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage>( |
||||
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 global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; |
||||
default: |
||||
throw new global::System.InvalidOperationException("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 global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; |
||||
default: |
||||
throw new global::System.InvalidOperationException("Can't get here."); |
||||
} |
||||
} |
||||
|
||||
public static Stub CreateStub(pb::IRpcChannel channel) { |
||||
return new Stub(channel); |
||||
} |
||||
|
||||
public class Stub : global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestService { |
||||
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, |
||||
global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request, |
||||
global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done) { |
||||
channel.CallMethod(Descriptor.Methods[0], |
||||
controller, request, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance, |
||||
pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(done, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance)); |
||||
} |
||||
} |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
// 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.NoGenericService { |
||||
|
||||
public static partial class UnitTestNoGenericServicesProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
registry.Add(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension); |
||||
} |
||||
#endregion |
||||
#region Extensions |
||||
public const int TestExtensionFieldNumber = 1000; |
||||
public static pb::GeneratedExtensionBase<int> TestExtension; |
||||
#endregion |
||||
|
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder> internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestNoGenericServicesProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CjJnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rfbm9fZ2VuZXJpY19zZXJ2aWNl" + |
||||
"cy5wcm90bxIoZ29vZ2xlLnByb3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNf" + |
||||
"dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2NzaGFycF9vcHRpb25zLnByb3RvIiMK" + |
||||
"C1Rlc3RNZXNzYWdlEgkKAWEYASABKAUqCQjoBxCAgICAAioTCghUZXN0RW51" + |
||||
"bRIHCgNGT08QATKCAQoLVGVzdFNlcnZpY2UScwoDRm9vEjUuZ29vZ2xlLnBy" + |
||||
"b3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNfdGVzdC5UZXN0TWVzc2FnZRo1" + |
||||
"Lmdvb2dsZS5wcm90b2J1Zi5ub19nZW5lcmljX3NlcnZpY2VzX3Rlc3QuVGVz" + |
||||
"dE1lc3NhZ2U6TgoOdGVzdF9leHRlbnNpb24SNS5nb29nbGUucHJvdG9idWYu" + |
||||
"bm9fZ2VuZXJpY19zZXJ2aWNlc190ZXN0LlRlc3RNZXNzYWdlGOgHIAEoBUJk" + |
||||
"gAEAiAEAkAEAwj5YCjJHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90" + |
||||
"b3MuTm9HZW5lcmljU2VydmljZRIiVW5pdFRlc3ROb0dlbmVyaWNTZXJ2aWNl" + |
||||
"c1Byb3RvRmlsZQ=="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor, |
||||
new string[] { "A", }); |
||||
global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor.Extensions[0]); |
||||
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 Enums |
||||
public enum TestEnum { |
||||
FOO = 1, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class TestMessage : pb::ExtendableMessage<TestMessage, TestMessage.Builder> { |
||||
private static readonly TestMessage defaultInstance = new Builder().BuildPartial(); |
||||
public static TestMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override TestMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override TestMessage ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<TestMessage, TestMessage.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int AFieldNumber = 1; |
||||
private bool hasA; |
||||
private int a_ = 0; |
||||
public bool HasA { |
||||
get { return hasA; } |
||||
} |
||||
public int A { |
||||
get { return a_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
if (!ExtensionsAreInitialized) return false; |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
pb::ExtendableMessage<TestMessage, TestMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); |
||||
if (HasA) { |
||||
output.WriteInt32(1, A); |
||||
} |
||||
extensionWriter.WriteUntil(536870912, output); |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasA) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, A); |
||||
} |
||||
size += ExtensionsSerializedSize; |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static TestMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static TestMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestMessage 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(TestMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::ExtendableBuilder<TestMessage, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
TestMessage result = new TestMessage(); |
||||
|
||||
protected override TestMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new TestMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Descriptor; } |
||||
} |
||||
|
||||
public override TestMessage DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override TestMessage BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
TestMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is TestMessage) { |
||||
return MergeFrom((TestMessage) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(TestMessage other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance) return this; |
||||
if (other.HasA) { |
||||
A = other.A; |
||||
} |
||||
this.MergeExtensionFields(other); |
||||
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: { |
||||
A = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasA { |
||||
get { return result.HasA; } |
||||
} |
||||
public int A { |
||||
get { return result.A; } |
||||
set { SetA(value); } |
||||
} |
||||
public Builder SetA(int value) { |
||||
result.hasA = true; |
||||
result.a_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearA() { |
||||
result.hasA = false; |
||||
result.a_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static TestMessage() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Services |
||||
public abstract class TestService : pb::IService { |
||||
public abstract void Foo( |
||||
pb::IRpcController controller, |
||||
global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request, |
||||
global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done); |
||||
|
||||
public static pbd::ServiceDescriptor Descriptor { |
||||
get { return UnitTestNoGenericServicesProtoFile.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, (global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage) request, |
||||
pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage>( |
||||
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 global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; |
||||
default: |
||||
throw new global::System.InvalidOperationException("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 global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; |
||||
default: |
||||
throw new global::System.InvalidOperationException("Can't get here."); |
||||
} |
||||
} |
||||
|
||||
public static Stub CreateStub(pb::IRpcChannel channel) { |
||||
return new Stub(channel); |
||||
} |
||||
|
||||
public class Stub : global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestService { |
||||
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, |
||||
global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request, |
||||
global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done) { |
||||
channel.CallMethod(Descriptor.Methods[0], |
||||
controller, request, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance, |
||||
pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(done, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance)); |
||||
} |
||||
} |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,246 +1,246 @@ |
||||
// 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 UnitTestImportLiteProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
#endregion |
||||
#region Extensions |
||||
internal static readonly object Descriptor; |
||||
static UnitTestImportLiteProtoFile() { |
||||
Descriptor = null; |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
#region Enums |
||||
public enum ImportEnumLite { |
||||
IMPORT_LITE_FOO = 7, |
||||
IMPORT_LITE_BAR = 8, |
||||
IMPORT_LITE_BAZ = 9, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> { |
||||
private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial(); |
||||
public static ImportMessageLite DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessageLite DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override ImportMessageLite ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public const int DFieldNumber = 1; |
||||
private bool hasD; |
||||
private int d_ = 0; |
||||
public bool HasD { |
||||
get { return hasD; } |
||||
} |
||||
public int D { |
||||
get { return d_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasD) { |
||||
output.WriteInt32(1, D); |
||||
} |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasD) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, D); |
||||
} |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
#region Lite runtime methods |
||||
public override int GetHashCode() { |
||||
int hash = GetType().GetHashCode(); |
||||
if (hasD) hash ^= d_.GetHashCode(); |
||||
return hash; |
||||
} |
||||
|
||||
public override bool Equals(object obj) { |
||||
ImportMessageLite other = obj as ImportMessageLite; |
||||
if (other == null) return false; |
||||
if (hasD != other.hasD || (hasD && !d_.Equals(other.d_))) return false; |
||||
return true; |
||||
} |
||||
|
||||
public override void PrintTo(global::System.IO.TextWriter writer) { |
||||
PrintField("d", hasD, d_, writer); |
||||
} |
||||
#endregion |
||||
|
||||
public static ImportMessageLite ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite 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(ImportMessageLite prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
ImportMessageLite result = new ImportMessageLite(); |
||||
|
||||
protected override ImportMessageLite MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new ImportMessageLite(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override ImportMessageLite DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessageLite BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
ImportMessageLite returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessageLite other) { |
||||
if (other is ImportMessageLite) { |
||||
return MergeFrom((ImportMessageLite) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(ImportMessageLite other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance) return this; |
||||
if (other.HasD) { |
||||
D = other.D; |
||||
} |
||||
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) { |
||||
while (true) { |
||||
uint tag = input.ReadTag(); |
||||
switch (tag) { |
||||
case 0: { |
||||
return this; |
||||
} |
||||
default: { |
||||
if (pb::WireFormat.IsEndGroupTag(tag)) { |
||||
return this; |
||||
} |
||||
ParseUnknownField(input, extensionRegistry, tag); |
||||
break; |
||||
} |
||||
case 8: { |
||||
D = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasD { |
||||
get { return result.HasD; } |
||||
} |
||||
public int D { |
||||
get { return result.D; } |
||||
set { SetD(value); } |
||||
} |
||||
public Builder SetD(int value) { |
||||
result.hasD = true; |
||||
result.d_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearD() { |
||||
result.hasD = false; |
||||
result.d_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static ImportMessageLite() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
// 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 UnitTestImportLiteProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
#endregion |
||||
#region Extensions |
||||
internal static readonly object Descriptor; |
||||
static UnitTestImportLiteProtoFile() { |
||||
Descriptor = null; |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
#region Enums |
||||
public enum ImportEnumLite { |
||||
IMPORT_LITE_FOO = 7, |
||||
IMPORT_LITE_BAR = 8, |
||||
IMPORT_LITE_BAZ = 9, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> { |
||||
private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial(); |
||||
public static ImportMessageLite DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessageLite DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override ImportMessageLite ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public const int DFieldNumber = 1; |
||||
private bool hasD; |
||||
private int d_ = 0; |
||||
public bool HasD { |
||||
get { return hasD; } |
||||
} |
||||
public int D { |
||||
get { return d_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasD) { |
||||
output.WriteInt32(1, D); |
||||
} |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasD) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, D); |
||||
} |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
#region Lite runtime methods |
||||
public override int GetHashCode() { |
||||
int hash = GetType().GetHashCode(); |
||||
if (hasD) hash ^= d_.GetHashCode(); |
||||
return hash; |
||||
} |
||||
|
||||
public override bool Equals(object obj) { |
||||
ImportMessageLite other = obj as ImportMessageLite; |
||||
if (other == null) return false; |
||||
if (hasD != other.hasD || (hasD && !d_.Equals(other.d_))) return false; |
||||
return true; |
||||
} |
||||
|
||||
public override void PrintTo(global::System.IO.TextWriter writer) { |
||||
PrintField("d", hasD, d_, writer); |
||||
} |
||||
#endregion |
||||
|
||||
public static ImportMessageLite ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessageLite 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(ImportMessageLite prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
ImportMessageLite result = new ImportMessageLite(); |
||||
|
||||
protected override ImportMessageLite MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new ImportMessageLite(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override ImportMessageLite DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessageLite BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
ImportMessageLite returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessageLite other) { |
||||
if (other is ImportMessageLite) { |
||||
return MergeFrom((ImportMessageLite) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(ImportMessageLite other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance) return this; |
||||
if (other.HasD) { |
||||
D = other.D; |
||||
} |
||||
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) { |
||||
while (true) { |
||||
uint tag = input.ReadTag(); |
||||
switch (tag) { |
||||
case 0: { |
||||
return this; |
||||
} |
||||
default: { |
||||
if (pb::WireFormat.IsEndGroupTag(tag)) { |
||||
return this; |
||||
} |
||||
ParseUnknownField(input, extensionRegistry, tag); |
||||
break; |
||||
} |
||||
case 8: { |
||||
D = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasD { |
||||
get { return result.HasD; } |
||||
} |
||||
public int D { |
||||
get { return result.D; } |
||||
set { SetD(value); } |
||||
} |
||||
public Builder SetD(int value) { |
||||
result.hasD = true; |
||||
result.d_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearD() { |
||||
result.hasD = false; |
||||
result.d_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static ImportMessageLite() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
|
@ -1,280 +1,280 @@ |
||||
// 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 UnitTestImportProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestImportProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" + |
||||
"b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" + |
||||
"b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" + |
||||
"SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" + |
||||
"CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" + |
||||
"PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" + |
||||
"dEltcG9ydFByb3RvRmlsZQ=="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor, |
||||
new string[] { "D", }); |
||||
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 Enums |
||||
public enum ImportEnum { |
||||
IMPORT_FOO = 7, |
||||
IMPORT_BAR = 8, |
||||
IMPORT_BAZ = 9, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> { |
||||
private static readonly ImportMessage defaultInstance = new Builder().BuildPartial(); |
||||
public static ImportMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override ImportMessage ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int DFieldNumber = 1; |
||||
private bool hasD; |
||||
private int d_ = 0; |
||||
public bool HasD { |
||||
get { return hasD; } |
||||
} |
||||
public int D { |
||||
get { return d_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasD) { |
||||
output.WriteInt32(1, D); |
||||
} |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasD) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, D); |
||||
} |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static ImportMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessage 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(ImportMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
ImportMessage result = new ImportMessage(); |
||||
|
||||
protected override ImportMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new ImportMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; } |
||||
} |
||||
|
||||
public override ImportMessage DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessage BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
ImportMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is ImportMessage) { |
||||
return MergeFrom((ImportMessage) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(ImportMessage other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this; |
||||
if (other.HasD) { |
||||
D = other.D; |
||||
} |
||||
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: { |
||||
D = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasD { |
||||
get { return result.HasD; } |
||||
} |
||||
public int D { |
||||
get { return result.D; } |
||||
set { SetD(value); } |
||||
} |
||||
public Builder SetD(int value) { |
||||
result.hasD = true; |
||||
result.d_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearD() { |
||||
result.hasD = false; |
||||
result.d_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static ImportMessage() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
// 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 UnitTestImportProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor; |
||||
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; |
||||
#endregion |
||||
#region Descriptor |
||||
public static pbd::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbd::FileDescriptor descriptor; |
||||
|
||||
static UnitTestImportProtoFile() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
"CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" + |
||||
"b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" + |
||||
"b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" + |
||||
"SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" + |
||||
"CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" + |
||||
"PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" + |
||||
"dEltcG9ydFByb3RvRmlsZQ=="); |
||||
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
||||
descriptor = root; |
||||
internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0]; |
||||
internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable = |
||||
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor, |
||||
new string[] { "D", }); |
||||
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 Enums |
||||
public enum ImportEnum { |
||||
IMPORT_FOO = 7, |
||||
IMPORT_BAR = 8, |
||||
IMPORT_BAZ = 9, |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
#region Messages |
||||
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> { |
||||
private static readonly ImportMessage defaultInstance = new Builder().BuildPartial(); |
||||
public static ImportMessage DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessage DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override ImportMessage ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public static pbd::MessageDescriptor Descriptor { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; } |
||||
} |
||||
|
||||
protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; } |
||||
} |
||||
|
||||
public const int DFieldNumber = 1; |
||||
private bool hasD; |
||||
private int d_ = 0; |
||||
public bool HasD { |
||||
get { return hasD; } |
||||
} |
||||
public int D { |
||||
get { return d_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasD) { |
||||
output.WriteInt32(1, D); |
||||
} |
||||
UnknownFields.WriteTo(output); |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasD) { |
||||
size += pb::CodedOutputStream.ComputeInt32Size(1, D); |
||||
} |
||||
size += UnknownFields.SerializedSize; |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
public static ImportMessage ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static ImportMessage ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static ImportMessage 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(ImportMessage prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
ImportMessage result = new ImportMessage(); |
||||
|
||||
protected override ImportMessage MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new ImportMessage(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override pbd::MessageDescriptor DescriptorForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; } |
||||
} |
||||
|
||||
public override ImportMessage DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; } |
||||
} |
||||
|
||||
public override ImportMessage BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
ImportMessage returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessage other) { |
||||
if (other is ImportMessage) { |
||||
return MergeFrom((ImportMessage) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(ImportMessage other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this; |
||||
if (other.HasD) { |
||||
D = other.D; |
||||
} |
||||
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: { |
||||
D = input.ReadInt32(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasD { |
||||
get { return result.HasD; } |
||||
} |
||||
public int D { |
||||
get { return result.D; } |
||||
set { SetD(value); } |
||||
} |
||||
public Builder SetD(int value) { |
||||
result.hasD = true; |
||||
result.d_ = value; |
||||
return this; |
||||
} |
||||
public Builder ClearD() { |
||||
result.hasD = false; |
||||
result.d_ = 0; |
||||
return this; |
||||
} |
||||
} |
||||
static ImportMessage() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
|
@ -1,260 +1,260 @@ |
||||
// 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 UnitTestLiteImportNonLiteProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
#endregion |
||||
#region Extensions |
||||
internal static readonly object Descriptor; |
||||
static UnitTestLiteImportNonLiteProtoFile() { |
||||
Descriptor = null; |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
#region Messages |
||||
public sealed partial class TestLiteImportsNonlite : pb::GeneratedMessageLite<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> { |
||||
private static readonly TestLiteImportsNonlite defaultInstance = new Builder().BuildPartial(); |
||||
public static TestLiteImportsNonlite DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override TestLiteImportsNonlite DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override TestLiteImportsNonlite ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public const int MessageFieldNumber = 1; |
||||
private bool hasMessage; |
||||
private global::Google.ProtocolBuffers.TestProtos.TestAllTypes message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; |
||||
public bool HasMessage { |
||||
get { return hasMessage; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message { |
||||
get { return message_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasMessage) { |
||||
output.WriteMessage(1, Message); |
||||
} |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasMessage) { |
||||
size += pb::CodedOutputStream.ComputeMessageSize(1, Message); |
||||
} |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
#region Lite runtime methods |
||||
public override int GetHashCode() { |
||||
int hash = GetType().GetHashCode(); |
||||
if (hasMessage) hash ^= message_.GetHashCode(); |
||||
return hash; |
||||
} |
||||
|
||||
public override bool Equals(object obj) { |
||||
TestLiteImportsNonlite other = obj as TestLiteImportsNonlite; |
||||
if (other == null) return false; |
||||
if (hasMessage != other.hasMessage || (hasMessage && !message_.Equals(other.message_))) return false; |
||||
return true; |
||||
} |
||||
|
||||
public override void PrintTo(global::System.IO.TextWriter writer) { |
||||
PrintField("message", hasMessage, message_, writer); |
||||
} |
||||
#endregion |
||||
|
||||
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite 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(TestLiteImportsNonlite prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilderLite<TestLiteImportsNonlite, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
TestLiteImportsNonlite result = new TestLiteImportsNonlite(); |
||||
|
||||
protected override TestLiteImportsNonlite MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new TestLiteImportsNonlite(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override TestLiteImportsNonlite DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance; } |
||||
} |
||||
|
||||
public override TestLiteImportsNonlite BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
TestLiteImportsNonlite returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessageLite other) { |
||||
if (other is TestLiteImportsNonlite) { |
||||
return MergeFrom((TestLiteImportsNonlite) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(TestLiteImportsNonlite other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance) return this; |
||||
if (other.HasMessage) { |
||||
MergeMessage(other.Message); |
||||
} |
||||
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) { |
||||
while (true) { |
||||
uint tag = input.ReadTag(); |
||||
switch (tag) { |
||||
case 0: { |
||||
return this; |
||||
} |
||||
default: { |
||||
if (pb::WireFormat.IsEndGroupTag(tag)) { |
||||
return this; |
||||
} |
||||
ParseUnknownField(input, extensionRegistry, tag); |
||||
break; |
||||
} |
||||
case 10: { |
||||
global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(); |
||||
if (HasMessage) { |
||||
subBuilder.MergeFrom(Message); |
||||
} |
||||
input.ReadMessage(subBuilder, extensionRegistry); |
||||
Message = subBuilder.BuildPartial(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasMessage { |
||||
get { return result.HasMessage; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message { |
||||
get { return result.Message; } |
||||
set { SetMessage(value); } |
||||
} |
||||
public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasMessage = true; |
||||
result.message_ = value; |
||||
return this; |
||||
} |
||||
public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) { |
||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||
result.hasMessage = true; |
||||
result.message_ = builderForValue.Build(); |
||||
return this; |
||||
} |
||||
public Builder MergeMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
if (result.HasMessage && |
||||
result.message_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) { |
||||
result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.message_).MergeFrom(value).BuildPartial(); |
||||
} else { |
||||
result.message_ = value; |
||||
} |
||||
result.hasMessage = true; |
||||
return this; |
||||
} |
||||
public Builder ClearMessage() { |
||||
result.hasMessage = false; |
||||
result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; |
||||
return this; |
||||
} |
||||
} |
||||
static TestLiteImportsNonlite() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestLiteImportNonLiteProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
// 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 UnitTestLiteImportNonLiteProtoFile { |
||||
|
||||
#region Extension registration |
||||
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { |
||||
} |
||||
#endregion |
||||
#region Static variables |
||||
#endregion |
||||
#region Extensions |
||||
internal static readonly object Descriptor; |
||||
static UnitTestLiteImportNonLiteProtoFile() { |
||||
Descriptor = null; |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
#region Messages |
||||
public sealed partial class TestLiteImportsNonlite : pb::GeneratedMessageLite<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> { |
||||
private static readonly TestLiteImportsNonlite defaultInstance = new Builder().BuildPartial(); |
||||
public static TestLiteImportsNonlite DefaultInstance { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
public override TestLiteImportsNonlite DefaultInstanceForType { |
||||
get { return defaultInstance; } |
||||
} |
||||
|
||||
protected override TestLiteImportsNonlite ThisMessage { |
||||
get { return this; } |
||||
} |
||||
|
||||
public const int MessageFieldNumber = 1; |
||||
private bool hasMessage; |
||||
private global::Google.ProtocolBuffers.TestProtos.TestAllTypes message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; |
||||
public bool HasMessage { |
||||
get { return hasMessage; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message { |
||||
get { return message_; } |
||||
} |
||||
|
||||
public override bool IsInitialized { |
||||
get { |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
public override void WriteTo(pb::CodedOutputStream output) { |
||||
int size = SerializedSize; |
||||
if (HasMessage) { |
||||
output.WriteMessage(1, Message); |
||||
} |
||||
} |
||||
|
||||
private int memoizedSerializedSize = -1; |
||||
public override int SerializedSize { |
||||
get { |
||||
int size = memoizedSerializedSize; |
||||
if (size != -1) return size; |
||||
|
||||
size = 0; |
||||
if (HasMessage) { |
||||
size += pb::CodedOutputStream.ComputeMessageSize(1, Message); |
||||
} |
||||
memoizedSerializedSize = size; |
||||
return size; |
||||
} |
||||
} |
||||
|
||||
#region Lite runtime methods |
||||
public override int GetHashCode() { |
||||
int hash = GetType().GetHashCode(); |
||||
if (hasMessage) hash ^= message_.GetHashCode(); |
||||
return hash; |
||||
} |
||||
|
||||
public override bool Equals(object obj) { |
||||
TestLiteImportsNonlite other = obj as TestLiteImportsNonlite; |
||||
if (other == null) return false; |
||||
if (hasMessage != other.hasMessage || (hasMessage && !message_.Equals(other.message_))) return false; |
||||
return true; |
||||
} |
||||
|
||||
public override void PrintTo(global::System.IO.TextWriter writer) { |
||||
PrintField("message", hasMessage, message_, writer); |
||||
} |
||||
#endregion |
||||
|
||||
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(byte[] data) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input) { |
||||
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { |
||||
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input) { |
||||
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); |
||||
} |
||||
public static TestLiteImportsNonlite 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(TestLiteImportsNonlite prototype) { |
||||
return (Builder) new Builder().MergeFrom(prototype); |
||||
} |
||||
|
||||
public sealed partial class Builder : pb::GeneratedBuilderLite<TestLiteImportsNonlite, Builder> { |
||||
protected override Builder ThisBuilder { |
||||
get { return this; } |
||||
} |
||||
public Builder() {} |
||||
|
||||
TestLiteImportsNonlite result = new TestLiteImportsNonlite(); |
||||
|
||||
protected override TestLiteImportsNonlite MessageBeingBuilt { |
||||
get { return result; } |
||||
} |
||||
|
||||
public override Builder Clear() { |
||||
result = new TestLiteImportsNonlite(); |
||||
return this; |
||||
} |
||||
|
||||
public override Builder Clone() { |
||||
return new Builder().MergeFrom(result); |
||||
} |
||||
|
||||
public override TestLiteImportsNonlite DefaultInstanceForType { |
||||
get { return global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance; } |
||||
} |
||||
|
||||
public override TestLiteImportsNonlite BuildPartial() { |
||||
if (result == null) { |
||||
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); |
||||
} |
||||
TestLiteImportsNonlite returnMe = result; |
||||
result = null; |
||||
return returnMe; |
||||
} |
||||
|
||||
public override Builder MergeFrom(pb::IMessageLite other) { |
||||
if (other is TestLiteImportsNonlite) { |
||||
return MergeFrom((TestLiteImportsNonlite) other); |
||||
} else { |
||||
base.MergeFrom(other); |
||||
return this; |
||||
} |
||||
} |
||||
|
||||
public override Builder MergeFrom(TestLiteImportsNonlite other) { |
||||
if (other == global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance) return this; |
||||
if (other.HasMessage) { |
||||
MergeMessage(other.Message); |
||||
} |
||||
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) { |
||||
while (true) { |
||||
uint tag = input.ReadTag(); |
||||
switch (tag) { |
||||
case 0: { |
||||
return this; |
||||
} |
||||
default: { |
||||
if (pb::WireFormat.IsEndGroupTag(tag)) { |
||||
return this; |
||||
} |
||||
ParseUnknownField(input, extensionRegistry, tag); |
||||
break; |
||||
} |
||||
case 10: { |
||||
global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(); |
||||
if (HasMessage) { |
||||
subBuilder.MergeFrom(Message); |
||||
} |
||||
input.ReadMessage(subBuilder, extensionRegistry); |
||||
Message = subBuilder.BuildPartial(); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
public bool HasMessage { |
||||
get { return result.HasMessage; } |
||||
} |
||||
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message { |
||||
get { return result.Message; } |
||||
set { SetMessage(value); } |
||||
} |
||||
public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
result.hasMessage = true; |
||||
result.message_ = value; |
||||
return this; |
||||
} |
||||
public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) { |
||||
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); |
||||
result.hasMessage = true; |
||||
result.message_ = builderForValue.Build(); |
||||
return this; |
||||
} |
||||
public Builder MergeMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) { |
||||
pb::ThrowHelper.ThrowIfNull(value, "value"); |
||||
if (result.HasMessage && |
||||
result.message_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) { |
||||
result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.message_).MergeFrom(value).BuildPartial(); |
||||
} else { |
||||
result.message_ = value; |
||||
} |
||||
result.hasMessage = true; |
||||
return this; |
||||
} |
||||
public Builder ClearMessage() { |
||||
result.hasMessage = false; |
||||
result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; |
||||
return this; |
||||
} |
||||
} |
||||
static TestLiteImportsNonlite() { |
||||
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestLiteImportNonLiteProtoFile.Descriptor, null); |
||||
} |
||||
} |
||||
|
||||
#endregion |
||||
|
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue