diff options
author | Jon Skeet <skeet@pobox.com> | 2015-07-30 09:47:38 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-07-30 09:47:38 +0100 |
commit | 7a0effb9e956ee5509d99a33f7d8fb52a9636871 (patch) | |
tree | 8bae164441950d8792d1b1612596809e45e9ce82 /csharp/src/AddressBook/Addressbook.cs | |
parent | 9cfea1d6f6b81462021b928f45c732cd9920d869 (diff) | |
parent | 7ec023acf4019e5401d4e147204ba5de12eed226 (diff) | |
download | protobuf-7a0effb9e956ee5509d99a33f7d8fb52a9636871.tar.gz protobuf-7a0effb9e956ee5509d99a33f7d8fb52a9636871.tar.bz2 protobuf-7a0effb9e956ee5509d99a33f7d8fb52a9636871.zip |
Merge pull request #654 from jtattermusch/csharp_hide_freeze
Remove the C# Freeze API
Diffstat (limited to 'csharp/src/AddressBook/Addressbook.cs')
-rw-r--r-- | csharp/src/AddressBook/Addressbook.cs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/csharp/src/AddressBook/Addressbook.cs b/csharp/src/AddressBook/Addressbook.cs index 231f1d09..f55800e6 100644 --- a/csharp/src/AddressBook/Addressbook.cs +++ b/csharp/src/AddressBook/Addressbook.cs @@ -74,20 +74,11 @@ namespace Google.Protobuf.Examples.AddressBook { return new Person(this); } - public void Freeze() { - if (IsFrozen) { - return; - } - _frozen = true; - phones_.Freeze(); - } - public const int NameFieldNumber = 1; private string name_ = ""; public string Name { get { return name_; } set { - pb::Freezable.CheckMutable(this); name_ = value ?? ""; } } @@ -97,7 +88,6 @@ namespace Google.Protobuf.Examples.AddressBook { public int Id { get { return id_; } set { - pb::Freezable.CheckMutable(this); id_ = value; } } @@ -107,7 +97,6 @@ namespace Google.Protobuf.Examples.AddressBook { public string Email { get { return email_; } set { - pb::Freezable.CheckMutable(this); email_ = value ?? ""; } } @@ -269,19 +258,11 @@ namespace Google.Protobuf.Examples.AddressBook { return new PhoneNumber(this); } - public void Freeze() { - if (IsFrozen) { - return; - } - _frozen = true; - } - public const int NumberFieldNumber = 1; private string number_ = ""; public string Number { get { return number_; } set { - pb::Freezable.CheckMutable(this); number_ = value ?? ""; } } @@ -291,7 +272,6 @@ namespace Google.Protobuf.Examples.AddressBook { public global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType Type { get { return type_; } set { - pb::Freezable.CheckMutable(this); type_ = value; } } @@ -417,14 +397,6 @@ namespace Google.Protobuf.Examples.AddressBook { return new AddressBook(this); } - public void Freeze() { - if (IsFrozen) { - return; - } - _frozen = true; - people_.Freeze(); - } - public const int PeopleFieldNumber = 1; private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.AddressBook.Person> _repeated_people_codec = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Examples.AddressBook.Person.Parser); |