diff options
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs index cb7292f3..2c8b0a31 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs @@ -59,6 +59,9 @@ namespace Google.Protobuf.TestProtos { get { return global::Google.Protobuf.TestProtos.UnittestImportPublicProto3.internal__static_protobuf_unittest_import_PublicImportMessage__FieldAccessorTable; } } + private bool _frozen = false; + public bool IsFrozen { get { return _frozen; } } + public PublicImportMessage() { } public PublicImportMessage(PublicImportMessage other) { @@ -69,14 +72,23 @@ namespace Google.Protobuf.TestProtos { return new PublicImportMessage(this); } + public void Freeze() { + if (IsFrozen) { + return; + } + _frozen = true; + } + public const int EFieldNumber = 1; private int e_; public int E { get { return e_; } - set { e_ = value; } + set { + pb::Freezable.CheckMutable(this); + e_ = value; + } } - public override bool Equals(object other) { return Equals(other as PublicImportMessage); } |