aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2015-07-30 13:35:55 +0100
committerJon Skeet <skeet@pobox.com>2015-07-30 13:35:55 +0100
commit7909b2edeb19affdf3f96a0b13a8098f28860c3c (patch)
tree7b2d1c5a0d8c8176d52b9d810eebfcf88dadcd08
parent7a0effb9e956ee5509d99a33f7d8fb52a9636871 (diff)
parentdea15a7ca474dde957f7c4826e517fbaa0c983d3 (diff)
downloadprotobuf-7909b2edeb19affdf3f96a0b13a8098f28860c3c.tar.gz
protobuf-7909b2edeb19affdf3f96a0b13a8098f28860c3c.tar.bz2
protobuf-7909b2edeb19affdf3f96a0b13a8098f28860c3c.zip
Merge pull request #659 from jskeet/fix-frozen
Remove a few hangers-on from frozenness.
-rw-r--r--csharp/src/AddressBook/Addressbook.cs9
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs21
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs3
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs3
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs21
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs105
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs12
-rw-r--r--csharp/src/Google.Protobuf/Collections/MapField.cs7
-rw-r--r--csharp/src/Google.Protobuf/Collections/RepeatedField.cs4
-rw-r--r--csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs66
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Any.cs3
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Api.cs6
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs3
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs3
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs3
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs3
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs9
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs3
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Type.cs15
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs27
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_message.cc4
21 files changed, 3 insertions, 327 deletions
diff --git a/csharp/src/AddressBook/Addressbook.cs b/csharp/src/AddressBook/Addressbook.cs
index f55800e6..92f983e7 100644
--- a/csharp/src/AddressBook/Addressbook.cs
+++ b/csharp/src/AddressBook/Addressbook.cs
@@ -54,9 +54,6 @@ namespace Google.Protobuf.Examples.AddressBook {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Person() {
OnConstruction();
}
@@ -240,9 +237,6 @@ namespace Google.Protobuf.Examples.AddressBook {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public PhoneNumber() {
OnConstruction();
}
@@ -380,9 +374,6 @@ namespace Google.Protobuf.Examples.AddressBook {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public AddressBook() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs
index 2c87943f..aac30ceb 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs
@@ -183,9 +183,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestMap() {
OnConstruction();
}
@@ -572,9 +569,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestMapSubmessage() {
OnConstruction();
}
@@ -687,9 +681,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestMessageMap() {
OnConstruction();
}
@@ -788,9 +779,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestSameTypeMap() {
OnConstruction();
}
@@ -907,9 +895,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestArenaMap() {
OnConstruction();
}
@@ -1260,9 +1245,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public MessageContainingEnumCalledType() {
OnConstruction();
}
@@ -1371,9 +1353,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public MessageContainingMapCalledEntry() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs
index 07ed125d..fae10957 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs
@@ -62,9 +62,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public ImportMessage() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs
index 71403fbb..17689f43 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs
@@ -48,9 +48,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public PublicImportMessage() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
index f09d6769..1a7b9dfd 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
@@ -80,9 +80,6 @@ namespace UnitTest.Issues.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Issue307() {
OnConstruction();
}
@@ -164,9 +161,6 @@ namespace UnitTest.Issues.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public NestedOnce() {
OnConstruction();
}
@@ -248,9 +242,6 @@ namespace UnitTest.Issues.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public NestedTwice() {
OnConstruction();
}
@@ -341,9 +332,6 @@ namespace UnitTest.Issues.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public NegativeEnumMessage() {
OnConstruction();
}
@@ -488,9 +476,6 @@ namespace UnitTest.Issues.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public DeprecatedChild() {
OnConstruction();
}
@@ -571,9 +556,6 @@ namespace UnitTest.Issues.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public DeprecatedFieldsMessage() {
OnConstruction();
}
@@ -800,9 +782,6 @@ namespace UnitTest.Issues.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public ItemField() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
index 4d98cc25..1f2e9229 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
@@ -232,9 +232,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestAllTypes() {
OnConstruction();
}
@@ -1473,9 +1470,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public NestedMessage() {
OnConstruction();
}
@@ -1587,9 +1581,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public NestedTestAllTypes() {
OnConstruction();
}
@@ -1752,9 +1743,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestDeprecatedFields() {
OnConstruction();
}
@@ -1862,9 +1850,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public ForeignMessage() {
OnConstruction();
}
@@ -1971,9 +1956,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestReservedFields() {
OnConstruction();
}
@@ -2054,9 +2036,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestForeignNested() {
OnConstruction();
}
@@ -2169,9 +2148,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestReallyLargeTagNumber() {
OnConstruction();
}
@@ -2304,9 +2280,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestRecursiveMessage() {
OnConstruction();
}
@@ -2445,9 +2418,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestMutualRecursionA() {
OnConstruction();
}
@@ -2560,9 +2530,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestMutualRecursionB() {
OnConstruction();
}
@@ -2701,9 +2668,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestCamelCaseFieldNames() {
OnConstruction();
}
@@ -2968,9 +2932,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestFieldOrderings() {
OnConstruction();
}
@@ -3162,9 +3123,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public NestedMessage() {
OnConstruction();
}
@@ -3302,9 +3260,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public SparseEnumMessage() {
OnConstruction();
}
@@ -3411,9 +3366,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public OneString() {
OnConstruction();
}
@@ -3520,9 +3472,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public MoreString() {
OnConstruction();
}
@@ -3621,9 +3570,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public OneBytes() {
OnConstruction();
}
@@ -3730,9 +3676,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public MoreBytes() {
OnConstruction();
}
@@ -3839,9 +3782,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Int32Message() {
OnConstruction();
}
@@ -3948,9 +3888,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Uint32Message() {
OnConstruction();
}
@@ -4057,9 +3994,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Int64Message() {
OnConstruction();
}
@@ -4166,9 +4100,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Uint64Message() {
OnConstruction();
}
@@ -4275,9 +4206,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public BoolMessage() {
OnConstruction();
}
@@ -4384,9 +4312,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestOneof() {
OnConstruction();
}
@@ -4579,9 +4504,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestPackedTypes() {
OnConstruction();
}
@@ -4928,9 +4850,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestUnpackedTypes() {
OnConstruction();
}
@@ -5277,9 +5196,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestRepeatedScalarDifferentTagSizes() {
OnConstruction();
}
@@ -5474,9 +5390,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestCommentInjectionMessage() {
OnConstruction();
}
@@ -5583,9 +5496,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FooRequest() {
OnConstruction();
}
@@ -5666,9 +5576,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FooResponse() {
OnConstruction();
}
@@ -5749,9 +5656,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FooClientMessage() {
OnConstruction();
}
@@ -5832,9 +5736,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FooServerMessage() {
OnConstruction();
}
@@ -5915,9 +5816,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public BarRequest() {
OnConstruction();
}
@@ -5998,9 +5896,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public BarResponse() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
index f938d70c..f18c5f1b 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
@@ -183,9 +183,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public TestWellKnownTypes() {
OnConstruction();
}
@@ -833,9 +830,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public RepeatedWellKnownTypes() {
OnConstruction();
}
@@ -1240,9 +1234,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public OneofWellKnownTypes() {
OnConstruction();
}
@@ -1910,9 +1901,6 @@ namespace Google.Protobuf.TestProtos {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public MapWellKnownTypes() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/Collections/MapField.cs b/csharp/src/Google.Protobuf/Collections/MapField.cs
index 0f7227c2..9f460e1e 100644
--- a/csharp/src/Google.Protobuf/Collections/MapField.cs
+++ b/csharp/src/Google.Protobuf/Collections/MapField.cs
@@ -54,7 +54,6 @@ namespace Google.Protobuf.Collections
{
// TODO: Don't create the map/list until we have an entry. (Assume many maps will be empty.)
private readonly bool allowNullValues;
- private bool frozen;
private readonly Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> map =
new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>();
private readonly LinkedList<KeyValuePair<TKey, TValue>> list = new LinkedList<KeyValuePair<TKey, TValue>>();
@@ -254,7 +253,7 @@ namespace Google.Protobuf.Collections
public bool AllowsNullValues { get { return allowNullValues; } }
public int Count { get { return list.Count; } }
- public bool IsReadOnly { get { return frozen; } }
+ public bool IsReadOnly { get { return false; } }
public override bool Equals(object other)
{
@@ -416,10 +415,6 @@ namespace Google.Protobuf.Collections
set
{
- if (frozen)
- {
- throw new NotSupportedException("Dictionary is frozen");
- }
this[(TKey)key] = (TValue)value;
}
}
diff --git a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
index e7fc0a3f..3ce19c81 100644
--- a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
+++ b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs
@@ -40,7 +40,7 @@ namespace Google.Protobuf.Collections
{
/// <summary>
/// The contents of a repeated field: essentially, a collection with some extra
- /// restrictions (no null values) and capabilities (deep cloning and freezing).
+ /// restrictions (no null values) and capabilities (deep cloning).
/// </summary>
/// <typeparam name="T">The element type of the repeated field.</typeparam>
public sealed class RepeatedField<T> : IList<T>, IList, IDeepCloneable<RepeatedField<T>>, IEquatable<RepeatedField<T>>
@@ -48,7 +48,6 @@ namespace Google.Protobuf.Collections
private static readonly T[] EmptyArray = new T[0];
private const int MinArraySize = 8;
- private bool frozen;
private T[] array = EmptyArray;
private int count = 0;
@@ -66,7 +65,6 @@ namespace Google.Protobuf.Collections
public RepeatedField<T> Clone()
{
RepeatedField<T> clone = new RepeatedField<T>();
- // Clone is implicitly *not* frozen, even if this object is.
if (array != EmptyArray)
{
clone.array = (T[])array.Clone();
diff --git a/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs b/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
index 6f55f5ab..213863e2 100644
--- a/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
+++ b/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
@@ -173,9 +173,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FileDescriptorSet() {
OnConstruction();
}
@@ -274,9 +271,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FileDescriptorProto() {
OnConstruction();
}
@@ -627,9 +621,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public DescriptorProto() {
OnConstruction();
}
@@ -913,9 +904,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public ExtensionRange() {
OnConstruction();
}
@@ -1048,9 +1036,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public ReservedRange() {
OnConstruction();
}
@@ -1188,9 +1173,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FieldDescriptorProto() {
OnConstruction();
}
@@ -1544,9 +1526,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public OneofDescriptorProto() {
OnConstruction();
}
@@ -1653,9 +1632,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public EnumDescriptorProto() {
OnConstruction();
}
@@ -1812,9 +1788,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public EnumValueDescriptorProto() {
OnConstruction();
}
@@ -1979,9 +1952,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public ServiceDescriptorProto() {
OnConstruction();
}
@@ -2138,9 +2108,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public MethodDescriptorProto() {
OnConstruction();
}
@@ -2383,9 +2350,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FileOptions() {
OnConstruction();
}
@@ -2860,9 +2824,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public MessageOptions() {
OnConstruction();
}
@@ -3065,9 +3026,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FieldOptions() {
OnConstruction();
}
@@ -3340,9 +3298,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public EnumOptions() {
OnConstruction();
}
@@ -3493,9 +3448,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public EnumValueOptions() {
OnConstruction();
}
@@ -3620,9 +3572,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public ServiceOptions() {
OnConstruction();
}
@@ -3747,9 +3696,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public MethodOptions() {
OnConstruction();
}
@@ -3874,9 +3820,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public UninterpretedOption() {
OnConstruction();
}
@@ -4132,9 +4075,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public NamePart() {
OnConstruction();
}
@@ -4272,9 +4212,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public SourceCodeInfo() {
OnConstruction();
}
@@ -4374,9 +4311,6 @@ namespace Google.Protobuf.Reflection {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Location() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
index 7882b991..86c8552f 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs
@@ -51,9 +51,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Any() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
index a066fd51..a8d4942a 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
@@ -61,9 +61,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Api() {
OnConstruction();
}
@@ -264,9 +261,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Method() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
index 3c43d634..26c8d2b6 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
@@ -52,9 +52,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Duration() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
index f3104409..e14992f4 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs
@@ -51,9 +51,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Empty() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
index c090aae8..45ef9859 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs
@@ -51,9 +51,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FieldMask() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs
index 73874cf1..c86dbada 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs
@@ -52,9 +52,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public SourceContext() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
index bb2e5c1b..a4411dd0 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
@@ -70,9 +70,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Struct() {
OnConstruction();
}
@@ -171,9 +168,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Value() {
OnConstruction();
}
@@ -459,9 +453,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public ListValue() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
index f66b1f43..3c42068a 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
@@ -52,9 +52,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Timestamp() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
index 719131a4..91ac0f6b 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
@@ -82,9 +82,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Type() {
OnConstruction();
}
@@ -277,9 +274,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Field() {
OnConstruction();
}
@@ -594,9 +588,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Enum() {
OnConstruction();
}
@@ -771,9 +762,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public EnumValue() {
OnConstruction();
}
@@ -924,9 +912,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Option() {
OnConstruction();
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
index 73577366..a5f6b7e8 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
@@ -61,9 +61,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public DoubleValue() {
OnConstruction();
}
@@ -170,9 +167,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public FloatValue() {
OnConstruction();
}
@@ -279,9 +273,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Int64Value() {
OnConstruction();
}
@@ -388,9 +379,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public UInt64Value() {
OnConstruction();
}
@@ -497,9 +485,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public Int32Value() {
OnConstruction();
}
@@ -606,9 +591,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public UInt32Value() {
OnConstruction();
}
@@ -715,9 +697,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public BoolValue() {
OnConstruction();
}
@@ -824,9 +803,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public StringValue() {
OnConstruction();
}
@@ -933,9 +909,6 @@ namespace Google.Protobuf.WellKnownTypes {
get { return Descriptor; }
}
- private bool _frozen = false;
- public bool IsFrozen { get { return _frozen; } }
-
public BytesValue() {
OnConstruction();
}
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc
index 86ef0489..54e7d92d 100644
--- a/src/google/protobuf/compiler/csharp/csharp_message.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_message.cc
@@ -134,9 +134,7 @@ void MessageGenerator::Generate(io::Printer* printer) {
"pbr::MessageDescriptor pb::IMessage.Descriptor {\n"
" get { return Descriptor; }\n"
"}\n"
- "\n"
- "private bool _frozen = false;\n"
- "public bool IsFrozen { get { return _frozen; } }\n\n");
+ "\n");
// Parameterless constructor and partial OnConstruction method.
printer->Print(