|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT! |
|
|
|
|
// 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; |
|
|
|
@ -13,39 +13,11 @@ namespace Google.ProtocolBuffers.TestProtos { |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
#region Static variables |
|
|
|
|
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor; |
|
|
|
|
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessageLite, global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.Builder> internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable; |
|
|
|
|
#endregion |
|
|
|
|
#region Descriptor |
|
|
|
|
public static pbd::FileDescriptor Descriptor { |
|
|
|
|
get { return descriptor; } |
|
|
|
|
} |
|
|
|
|
private static pbd::FileDescriptor descriptor; |
|
|
|
|
|
|
|
|
|
#region Extensions |
|
|
|
|
internal static readonly object Descriptor; |
|
|
|
|
static UnitTestImportLiteProtoFile() { |
|
|
|
|
byte[] descriptorData = global::System.Convert.FromBase64String( |
|
|
|
|
"Cipnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0X2xpdGUucHJvdG8S" + |
|
|
|
|
"GHByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydBokZ29vZ2xlL3Byb3RvYnVmL2Nz" + |
|
|
|
|
"aGFycF9vcHRpb25zLnByb3RvIh4KEUltcG9ydE1lc3NhZ2VMaXRlEgkKAWQY" + |
|
|
|
|
"ASABKAUqTwoOSW1wb3J0RW51bUxpdGUSEwoPSU1QT1JUX0xJVEVfRk9PEAcS" + |
|
|
|
|
"EwoPSU1QT1JUX0xJVEVfQkFSEAgSEwoPSU1QT1JUX0xJVEVfQkFaEAlCWgoT" + |
|
|
|
|
"Y29tLmdvb2dsZS5wcm90b2J1ZkgDwj5ACiFHb29nbGUuUHJvdG9jb2xCdWZm" + |
|
|
|
|
"ZXJzLlRlc3RQcm90b3MSG1VuaXRUZXN0SW1wb3J0TGl0ZVByb3RvRmlsZQ=="); |
|
|
|
|
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
|
|
|
|
descriptor = root; |
|
|
|
|
internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor = Descriptor.MessageTypes[0]; |
|
|
|
|
internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable = |
|
|
|
|
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessageLite, global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.Builder>(internal__static_protobuf_unittest_import_ImportMessageLite__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); |
|
|
|
|
Descriptor = null; |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
@ -60,7 +32,7 @@ namespace Google.ProtocolBuffers.TestProtos { |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region Messages |
|
|
|
|
public sealed partial class ImportMessageLite : pb::GeneratedMessage<ImportMessageLite, ImportMessageLite.Builder> { |
|
|
|
|
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; } |
|
|
|
@ -74,14 +46,6 @@ namespace Google.ProtocolBuffers.TestProtos { |
|
|
|
|
get { return this; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static pbd::MessageDescriptor Descriptor { |
|
|
|
|
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.internal__static_protobuf_unittest_import_ImportMessageLite__Descriptor; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected override pb::FieldAccess.FieldAccessorTable<ImportMessageLite, ImportMessageLite.Builder> InternalFieldAccessors { |
|
|
|
|
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.internal__static_protobuf_unittest_import_ImportMessageLite__FieldAccessorTable; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public const int DFieldNumber = 1; |
|
|
|
|
private bool hasD; |
|
|
|
|
private int d_ = 0; |
|
|
|
@ -92,6 +56,53 @@ namespace Google.ProtocolBuffers.TestProtos { |
|
|
|
|
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(); |
|
|
|
|
} |
|
|
|
@ -129,7 +140,7 @@ namespace Google.ProtocolBuffers.TestProtos { |
|
|
|
|
return (Builder) new Builder().MergeFrom(prototype); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public sealed partial class Builder : pb::GeneratedBuilder<ImportMessageLite, Builder> { |
|
|
|
|
public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> { |
|
|
|
|
protected override Builder ThisBuilder { |
|
|
|
|
get { return this; } |
|
|
|
|
} |
|
|
|
@ -150,10 +161,6 @@ namespace Google.ProtocolBuffers.TestProtos { |
|
|
|
|
return new Builder().MergeFrom(result); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override pbd::MessageDescriptor DescriptorForType { |
|
|
|
|
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.Descriptor; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override ImportMessageLite DefaultInstanceForType { |
|
|
|
|
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; } |
|
|
|
|
} |
|
|
|
@ -167,6 +174,49 @@ namespace Google.ProtocolBuffers.TestProtos { |
|
|
|
|
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; } |
|
|
|
|