Commit 5350822b authored by Jon Skeet's avatar Jon Skeet

Regenerated code due to previous commit.

Note that now we need a proto3 version of addressbook.proto. This may affect other platforms, and could do with an overhaul to follow proto3 conventions anyway (e.g. repeated field names). Will need to think about that carefully before merging into master. Raised issue #565 for this.
parent 493e3db9
......@@ -26,15 +26,15 @@ namespace Google.Protobuf.Examples.AddressBook {
static Addressbook() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChFhZGRyZXNzYm9vay5wcm90bxIIdHV0b3JpYWwi2gEKBlBlcnNvbhIMCgRu",
"YW1lGAEgAigJEgoKAmlkGAIgAigFEg0KBWVtYWlsGAMgASgJEisKBXBob25l",
"GAQgAygLMhwudHV0b3JpYWwuUGVyc29uLlBob25lTnVtYmVyGk0KC1Bob25l",
"TnVtYmVyEg4KBm51bWJlchgBIAIoCRIuCgR0eXBlGAIgASgOMhoudHV0b3Jp",
"YWwuUGVyc29uLlBob25lVHlwZToESE9NRSIrCglQaG9uZVR5cGUSCgoGTU9C",
"SUxFEAASCAoESE9NRRABEggKBFdPUksQAiIvCgtBZGRyZXNzQm9vaxIgCgZw",
"ZXJzb24YASADKAsyEC50dXRvcmlhbC5QZXJzb25CUAoUY29tLmV4YW1wbGUu",
"dHV0b3JpYWxCEUFkZHJlc3NCb29rUHJvdG9zqgIkR29vZ2xlLlByb3RvYnVm",
"LkV4YW1wbGVzLkFkZHJlc3NCb29r"));
"ChFhZGRyZXNzYm9vay5wcm90bxIIdHV0b3JpYWwi1AEKBlBlcnNvbhIMCgRu",
"YW1lGAEgASgJEgoKAmlkGAIgASgFEg0KBWVtYWlsGAMgASgJEisKBXBob25l",
"GAQgAygLMhwudHV0b3JpYWwuUGVyc29uLlBob25lTnVtYmVyGkcKC1Bob25l",
"TnVtYmVyEg4KBm51bWJlchgBIAEoCRIoCgR0eXBlGAIgASgOMhoudHV0b3Jp",
"YWwuUGVyc29uLlBob25lVHlwZSIrCglQaG9uZVR5cGUSCgoGTU9CSUxFEAAS",
"CAoESE9NRRABEggKBFdPUksQAiIvCgtBZGRyZXNzQm9vaxIgCgZwZXJzb24Y",
"ASADKAsyEC50dXRvcmlhbC5QZXJzb25CUAoUY29tLmV4YW1wbGUudHV0b3Jp",
"YWxCEUFkZHJlc3NCb29rUHJvdG9zqgIkR29vZ2xlLlByb3RvYnVmLkV4YW1w",
"bGVzLkFkZHJlc3NCb29rYgZwcm90bzM="));
descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] {
});
......@@ -70,9 +70,13 @@ namespace Google.Protobuf.Examples.AddressBook {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public Person() { }
public Person() {
OnConstruction();
}
partial void OnConstruction();
public Person(Person other) {
public Person(Person other) : this() {
name_ = other.name_;
id_ = other.id_;
email_ = other.email_;
......@@ -261,9 +265,13 @@ namespace Google.Protobuf.Examples.AddressBook {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public PhoneNumber() { }
public PhoneNumber() {
OnConstruction();
}
partial void OnConstruction();
public PhoneNumber(PhoneNumber other) {
public PhoneNumber(PhoneNumber other) : this() {
number_ = other.number_;
type_ = other.type_;
}
......@@ -290,7 +298,7 @@ namespace Google.Protobuf.Examples.AddressBook {
}
public const int TypeFieldNumber = 2;
private global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType type_ = global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.HOME;
private global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType type_ = global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.MOBILE;
public global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType Type {
get { return type_; }
set {
......@@ -318,7 +326,7 @@ namespace Google.Protobuf.Examples.AddressBook {
public override int GetHashCode() {
int hash = 1;
if (Number.Length != 0) hash ^= Number.GetHashCode();
if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.HOME) hash ^= Type.GetHashCode();
if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.MOBILE) hash ^= Type.GetHashCode();
return hash;
}
......@@ -327,7 +335,7 @@ namespace Google.Protobuf.Examples.AddressBook {
output.WriteRawTag(10);
output.WriteString(Number);
}
if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.HOME) {
if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.MOBILE) {
output.WriteRawTag(16);
output.WriteEnum((int) Type);
}
......@@ -338,7 +346,7 @@ namespace Google.Protobuf.Examples.AddressBook {
if (Number.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Number);
}
if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.HOME) {
if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.MOBILE) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
}
return size;
......@@ -351,7 +359,7 @@ namespace Google.Protobuf.Examples.AddressBook {
if (other.Number.Length != 0) {
Number = other.Number;
}
if (other.Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.HOME) {
if (other.Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.MOBILE) {
Type = other.Type;
}
}
......@@ -404,9 +412,13 @@ namespace Google.Protobuf.Examples.AddressBook {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public AddressBook() { }
public AddressBook() {
OnConstruction();
}
partial void OnConstruction();
public AddressBook(AddressBook other) {
public AddressBook(AddressBook other) : this() {
person_ = other.person_.Clone();
}
......
......@@ -72,9 +72,13 @@ namespace Google.Protobuf.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public ImportMessage() { }
public ImportMessage() {
OnConstruction();
}
partial void OnConstruction();
public ImportMessage(ImportMessage other) {
public ImportMessage(ImportMessage other) : this() {
d_ = other.d_;
}
......
......@@ -57,9 +57,13 @@ namespace Google.Protobuf.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public PublicImportMessage() { }
public PublicImportMessage() {
OnConstruction();
}
partial void OnConstruction();
public PublicImportMessage(PublicImportMessage other) {
public PublicImportMessage(PublicImportMessage other) : this() {
e_ = other.e_;
}
......
......@@ -109,9 +109,13 @@ namespace UnitTest.Issues.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public Issue307() { }
public Issue307() {
OnConstruction();
}
partial void OnConstruction();
public Issue307(Issue307 other) {
public Issue307(Issue307 other) : this() {
}
public Issue307 Clone() {
......@@ -194,9 +198,13 @@ namespace UnitTest.Issues.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public NestedOnce() { }
public NestedOnce() {
OnConstruction();
}
partial void OnConstruction();
public NestedOnce(NestedOnce other) {
public NestedOnce(NestedOnce other) : this() {
}
public NestedOnce Clone() {
......@@ -279,9 +287,13 @@ namespace UnitTest.Issues.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public NestedTwice() { }
public NestedTwice() {
OnConstruction();
}
partial void OnConstruction();
public NestedTwice(NestedTwice other) {
public NestedTwice(NestedTwice other) : this() {
}
public NestedTwice Clone() {
......@@ -373,9 +385,13 @@ namespace UnitTest.Issues.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public NegativeEnumMessage() { }
public NegativeEnumMessage() {
OnConstruction();
}
partial void OnConstruction();
public NegativeEnumMessage(NegativeEnumMessage other) {
public NegativeEnumMessage(NegativeEnumMessage other) : this() {
value_ = other.value_;
values_ = other.values_.Clone();
packedValues_ = other.packedValues_.Clone();
......@@ -522,9 +538,13 @@ namespace UnitTest.Issues.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public DeprecatedChild() { }
public DeprecatedChild() {
OnConstruction();
}
partial void OnConstruction();
public DeprecatedChild(DeprecatedChild other) {
public DeprecatedChild(DeprecatedChild other) : this() {
}
public DeprecatedChild Clone() {
......@@ -606,9 +626,13 @@ namespace UnitTest.Issues.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public DeprecatedFieldsMessage() { }
public DeprecatedFieldsMessage() {
OnConstruction();
}
public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) {
partial void OnConstruction();
public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() {
primitiveValue_ = other.primitiveValue_;
primitiveArray_ = other.primitiveArray_.Clone();
MessageValue = other.messageValue_ != null ? other.MessageValue.Clone() : null;
......@@ -842,9 +866,13 @@ namespace UnitTest.Issues.TestProtos {
private bool _frozen = false;
public bool IsFrozen { get { return _frozen; } }
public ItemField() { }
public ItemField() {
OnConstruction();
}
partial void OnConstruction();
public ItemField(ItemField other) {
public ItemField(ItemField other) : this() {
item_ = other.item_;
}
......
// See README.txt for information and build instructions.
syntax = "proto2";
syntax = "proto3";
package tutorial;
......@@ -9,9 +9,9 @@ option java_outer_classname = "AddressBookProtos";
option csharp_namespace = "Google.Protobuf.Examples.AddressBook";
message Person {
required string name = 1;
required int32 id = 2; // Unique ID number for this person.
optional string email = 3;
string name = 1;
int32 id = 2; // Unique ID number for this person.
string email = 3;
enum PhoneType {
MOBILE = 0;
......@@ -20,8 +20,8 @@ message Person {
}
message PhoneNumber {
required string number = 1;
optional PhoneType type = 2 [default = HOME];
string number = 1;
PhoneType type = 2;
}
repeated PhoneNumber phone = 4;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment