diff options
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test/TestProtos')
5 files changed, 528 insertions, 176 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/MapUnittestProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/MapUnittestProto3.cs index 365c03a7..55434c53 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/MapUnittestProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/MapUnittestProto3.cs @@ -359,9 +359,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestMap() { } + public TestMap() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestMap(TestMap other) { + public TestMap(TestMap other) : this() { mapInt32Int32_ = other.mapInt32Int32_.Clone(); mapInt64Int64_ = other.mapInt64Int64_.Clone(); mapUint32Uint32_ = other.mapUint32Uint32_.Clone(); @@ -767,9 +771,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32Int32Entry() { } + public MapInt32Int32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32Int32Entry(MapInt32Int32Entry other) { + public MapInt32Int32Entry(MapInt32Int32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -905,9 +913,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt64Int64Entry() { } + public MapInt64Int64Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt64Int64Entry(MapInt64Int64Entry other) { + public MapInt64Int64Entry(MapInt64Int64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -1043,9 +1055,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapUint32Uint32Entry() { } + public MapUint32Uint32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapUint32Uint32Entry(MapUint32Uint32Entry other) { + public MapUint32Uint32Entry(MapUint32Uint32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -1181,9 +1197,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapUint64Uint64Entry() { } + public MapUint64Uint64Entry() { + OnConstruction(); + } - public MapUint64Uint64Entry(MapUint64Uint64Entry other) { + partial void OnConstruction(); + + public MapUint64Uint64Entry(MapUint64Uint64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -1319,9 +1339,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapSint32Sint32Entry() { } + public MapSint32Sint32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapSint32Sint32Entry(MapSint32Sint32Entry other) { + public MapSint32Sint32Entry(MapSint32Sint32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -1457,9 +1481,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapSint64Sint64Entry() { } + public MapSint64Sint64Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapSint64Sint64Entry(MapSint64Sint64Entry other) { + public MapSint64Sint64Entry(MapSint64Sint64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -1595,9 +1623,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapFixed32Fixed32Entry() { } + public MapFixed32Fixed32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapFixed32Fixed32Entry(MapFixed32Fixed32Entry other) { + public MapFixed32Fixed32Entry(MapFixed32Fixed32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -1733,9 +1765,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapFixed64Fixed64Entry() { } + public MapFixed64Fixed64Entry() { + OnConstruction(); + } - public MapFixed64Fixed64Entry(MapFixed64Fixed64Entry other) { + partial void OnConstruction(); + + public MapFixed64Fixed64Entry(MapFixed64Fixed64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -1871,9 +1907,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapSfixed32Sfixed32Entry() { } + public MapSfixed32Sfixed32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapSfixed32Sfixed32Entry(MapSfixed32Sfixed32Entry other) { + public MapSfixed32Sfixed32Entry(MapSfixed32Sfixed32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -2009,9 +2049,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapSfixed64Sfixed64Entry() { } + public MapSfixed64Sfixed64Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapSfixed64Sfixed64Entry(MapSfixed64Sfixed64Entry other) { + public MapSfixed64Sfixed64Entry(MapSfixed64Sfixed64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -2147,9 +2191,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32FloatEntry() { } + public MapInt32FloatEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32FloatEntry(MapInt32FloatEntry other) { + public MapInt32FloatEntry(MapInt32FloatEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -2285,9 +2333,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32DoubleEntry() { } + public MapInt32DoubleEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32DoubleEntry(MapInt32DoubleEntry other) { + public MapInt32DoubleEntry(MapInt32DoubleEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -2423,9 +2475,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapBoolBoolEntry() { } + public MapBoolBoolEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapBoolBoolEntry(MapBoolBoolEntry other) { + public MapBoolBoolEntry(MapBoolBoolEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -2561,9 +2617,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapStringStringEntry() { } + public MapStringStringEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapStringStringEntry(MapStringStringEntry other) { + public MapStringStringEntry(MapStringStringEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -2699,9 +2759,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32BytesEntry() { } + public MapInt32BytesEntry() { + OnConstruction(); + } - public MapInt32BytesEntry(MapInt32BytesEntry other) { + partial void OnConstruction(); + + public MapInt32BytesEntry(MapInt32BytesEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -2837,9 +2901,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32EnumEntry() { } + public MapInt32EnumEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32EnumEntry(MapInt32EnumEntry other) { + public MapInt32EnumEntry(MapInt32EnumEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -2975,9 +3043,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32ForeignMessageEntry() { } + public MapInt32ForeignMessageEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32ForeignMessageEntry(MapInt32ForeignMessageEntry other) { + public MapInt32ForeignMessageEntry(MapInt32ForeignMessageEntry other) : this() { key_ = other.key_; Value = other.value_ != null ? other.Value.Clone() : null; } @@ -3125,9 +3197,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestMapSubmessage() { } + public TestMapSubmessage() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestMapSubmessage(TestMapSubmessage other) { + public TestMapSubmessage(TestMapSubmessage other) : this() { TestMap = other.testMap_ != null ? other.TestMap.Clone() : null; } @@ -3243,9 +3319,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestMessageMap() { } + public TestMessageMap() { + OnConstruction(); + } - public TestMessageMap(TestMessageMap other) { + partial void OnConstruction(); + + public TestMessageMap(TestMessageMap other) : this() { mapInt32Message_ = other.mapInt32Message_.Clone(); } @@ -3347,9 +3427,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32MessageEntry() { } + public MapInt32MessageEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32MessageEntry(MapInt32MessageEntry other) { + public MapInt32MessageEntry(MapInt32MessageEntry other) : this() { key_ = other.key_; Value = other.value_ != null ? other.Value.Clone() : null; } @@ -3497,9 +3581,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestSameTypeMap() { } + public TestSameTypeMap() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestSameTypeMap(TestSameTypeMap other) { + public TestSameTypeMap(TestSameTypeMap other) : this() { map1_ = other.map1_.Clone(); map2_ = other.map2_.Clone(); } @@ -3620,9 +3708,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public Map1Entry() { } + public Map1Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public Map1Entry(Map1Entry other) { + public Map1Entry(Map1Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -3758,9 +3850,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public Map2Entry() { } + public Map2Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public Map2Entry(Map2Entry other) { + public Map2Entry(Map2Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -3901,9 +3997,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestArenaMap() { } + public TestArenaMap() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestArenaMap(TestArenaMap other) { + public TestArenaMap(TestArenaMap other) : this() { mapInt32Int32_ = other.mapInt32Int32_.Clone(); mapInt64Int64_ = other.mapInt64Int64_.Clone(); mapUint32Uint32_ = other.mapUint32Uint32_.Clone(); @@ -4271,9 +4371,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32Int32Entry() { } + public MapInt32Int32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32Int32Entry(MapInt32Int32Entry other) { + public MapInt32Int32Entry(MapInt32Int32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -4409,9 +4513,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt64Int64Entry() { } + public MapInt64Int64Entry() { + OnConstruction(); + } - public MapInt64Int64Entry(MapInt64Int64Entry other) { + partial void OnConstruction(); + + public MapInt64Int64Entry(MapInt64Int64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -4547,9 +4655,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapUint32Uint32Entry() { } + public MapUint32Uint32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapUint32Uint32Entry(MapUint32Uint32Entry other) { + public MapUint32Uint32Entry(MapUint32Uint32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -4685,9 +4797,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapUint64Uint64Entry() { } + public MapUint64Uint64Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapUint64Uint64Entry(MapUint64Uint64Entry other) { + public MapUint64Uint64Entry(MapUint64Uint64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -4823,9 +4939,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapSint32Sint32Entry() { } + public MapSint32Sint32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapSint32Sint32Entry(MapSint32Sint32Entry other) { + public MapSint32Sint32Entry(MapSint32Sint32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -4961,9 +5081,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapSint64Sint64Entry() { } + public MapSint64Sint64Entry() { + OnConstruction(); + } - public MapSint64Sint64Entry(MapSint64Sint64Entry other) { + partial void OnConstruction(); + + public MapSint64Sint64Entry(MapSint64Sint64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -5099,9 +5223,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapFixed32Fixed32Entry() { } + public MapFixed32Fixed32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapFixed32Fixed32Entry(MapFixed32Fixed32Entry other) { + public MapFixed32Fixed32Entry(MapFixed32Fixed32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -5237,9 +5365,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapFixed64Fixed64Entry() { } + public MapFixed64Fixed64Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapFixed64Fixed64Entry(MapFixed64Fixed64Entry other) { + public MapFixed64Fixed64Entry(MapFixed64Fixed64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -5375,9 +5507,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapSfixed32Sfixed32Entry() { } + public MapSfixed32Sfixed32Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapSfixed32Sfixed32Entry(MapSfixed32Sfixed32Entry other) { + public MapSfixed32Sfixed32Entry(MapSfixed32Sfixed32Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -5513,9 +5649,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapSfixed64Sfixed64Entry() { } + public MapSfixed64Sfixed64Entry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapSfixed64Sfixed64Entry(MapSfixed64Sfixed64Entry other) { + public MapSfixed64Sfixed64Entry(MapSfixed64Sfixed64Entry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -5651,9 +5791,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32FloatEntry() { } + public MapInt32FloatEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32FloatEntry(MapInt32FloatEntry other) { + public MapInt32FloatEntry(MapInt32FloatEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -5789,9 +5933,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32DoubleEntry() { } + public MapInt32DoubleEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32DoubleEntry(MapInt32DoubleEntry other) { + public MapInt32DoubleEntry(MapInt32DoubleEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -5927,9 +6075,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapBoolBoolEntry() { } + public MapBoolBoolEntry() { + OnConstruction(); + } - public MapBoolBoolEntry(MapBoolBoolEntry other) { + partial void OnConstruction(); + + public MapBoolBoolEntry(MapBoolBoolEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -6065,9 +6217,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32EnumEntry() { } + public MapInt32EnumEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32EnumEntry(MapInt32EnumEntry other) { + public MapInt32EnumEntry(MapInt32EnumEntry other) : this() { key_ = other.key_; value_ = other.value_; } @@ -6203,9 +6359,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MapInt32ForeignMessageEntry() { } + public MapInt32ForeignMessageEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MapInt32ForeignMessageEntry(MapInt32ForeignMessageEntry other) { + public MapInt32ForeignMessageEntry(MapInt32ForeignMessageEntry other) : this() { key_ = other.key_; Value = other.value_ != null ? other.Value.Clone() : null; } @@ -6353,9 +6513,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MessageContainingEnumCalledType() { } + public MessageContainingEnumCalledType() { + OnConstruction(); + } + + partial void OnConstruction(); - public MessageContainingEnumCalledType(MessageContainingEnumCalledType other) { + public MessageContainingEnumCalledType(MessageContainingEnumCalledType other) : this() { type_ = other.type_.Clone(); } @@ -6461,9 +6625,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TypeEntry() { } + public TypeEntry() { + OnConstruction(); + } - public TypeEntry(TypeEntry other) { + partial void OnConstruction(); + + public TypeEntry(TypeEntry other) : this() { key_ = other.key_; Value = other.value_ != null ? other.Value.Clone() : null; } @@ -6611,9 +6779,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MessageContainingMapCalledEntry() { } + public MessageContainingMapCalledEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public MessageContainingMapCalledEntry(MessageContainingMapCalledEntry other) { + public MessageContainingMapCalledEntry(MessageContainingMapCalledEntry other) : this() { entry_ = other.entry_.Clone(); } @@ -6715,9 +6887,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public EntryEntry() { } + public EntryEntry() { + OnConstruction(); + } + + partial void OnConstruction(); - public EntryEntry(EntryEntry other) { + public EntryEntry(EntryEntry other) : this() { key_ = other.key_; value_ = other.value_; } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportProto3.cs index 5afcb4e0..d30f22db 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportProto3.cs @@ -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_; } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs index 79c0876e..5aa03a64 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestImportPublicProto3.cs @@ -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_; } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs index 124f2de7..0e409c8b 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs @@ -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_; } diff --git a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestProto3.cs b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestProto3.cs index c9aed740..d2437bf4 100644 --- a/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestProto3.cs +++ b/csharp/src/ProtocolBuffers.Test/TestProtos/UnittestProto3.cs @@ -346,9 +346,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestAllTypes() { } + public TestAllTypes() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestAllTypes(TestAllTypes other) { + public TestAllTypes(TestAllTypes other) : this() { singleInt32_ = other.singleInt32_; singleInt64_ = other.singleInt64_; singleUint32_ = other.singleUint32_; @@ -1639,9 +1643,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public NestedMessage() { } + public NestedMessage() { + OnConstruction(); + } - public NestedMessage(NestedMessage other) { + partial void OnConstruction(); + + public NestedMessage(NestedMessage other) : this() { bb_ = other.bb_; } @@ -1755,9 +1763,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public NestedTestAllTypes() { } + public NestedTestAllTypes() { + OnConstruction(); + } - public NestedTestAllTypes(NestedTestAllTypes other) { + partial void OnConstruction(); + + public NestedTestAllTypes(NestedTestAllTypes other) : this() { Child = other.child_ != null ? other.Child.Clone() : null; Payload = other.payload_ != null ? other.Payload.Clone() : null; repeatedChild_ = other.repeatedChild_.Clone(); @@ -1926,9 +1938,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestDeprecatedFields() { } + public TestDeprecatedFields() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestDeprecatedFields(TestDeprecatedFields other) { + public TestDeprecatedFields(TestDeprecatedFields other) : this() { deprecatedInt32_ = other.deprecatedInt32_; } @@ -2038,9 +2054,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public ForeignMessage() { } + public ForeignMessage() { + OnConstruction(); + } + + partial void OnConstruction(); - public ForeignMessage(ForeignMessage other) { + public ForeignMessage(ForeignMessage other) : this() { c_ = other.c_; } @@ -2149,9 +2169,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestReservedFields() { } + public TestReservedFields() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestReservedFields(TestReservedFields other) { + public TestReservedFields(TestReservedFields other) : this() { } public TestReservedFields Clone() { @@ -2233,9 +2257,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestForeignNested() { } + public TestForeignNested() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestForeignNested(TestForeignNested other) { + public TestForeignNested(TestForeignNested other) : this() { ForeignNested = other.foreignNested_ != null ? other.ForeignNested.Clone() : null; } @@ -2351,9 +2379,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestReallyLargeTagNumber() { } + public TestReallyLargeTagNumber() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) { + public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) : this() { a_ = other.a_; bb_ = other.bb_; } @@ -2489,9 +2521,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestRecursiveMessage() { } + public TestRecursiveMessage() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestRecursiveMessage(TestRecursiveMessage other) { + public TestRecursiveMessage(TestRecursiveMessage other) : this() { A = other.a_ != null ? other.A.Clone() : null; i_ = other.i_; } @@ -2634,9 +2670,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestMutualRecursionA() { } + public TestMutualRecursionA() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestMutualRecursionA(TestMutualRecursionA other) { + public TestMutualRecursionA(TestMutualRecursionA other) : this() { Bb = other.bb_ != null ? other.Bb.Clone() : null; } @@ -2752,9 +2792,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestMutualRecursionB() { } + public TestMutualRecursionB() { + OnConstruction(); + } - public TestMutualRecursionB(TestMutualRecursionB other) { + partial void OnConstruction(); + + public TestMutualRecursionB(TestMutualRecursionB other) : this() { A = other.a_ != null ? other.A.Clone() : null; optionalInt32_ = other.optionalInt32_; } @@ -2897,9 +2941,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestCamelCaseFieldNames() { } + public TestCamelCaseFieldNames() { + OnConstruction(); + } - public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) { + partial void OnConstruction(); + + public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) : this() { primitiveField_ = other.primitiveField_; stringField_ = other.stringField_; enumField_ = other.enumField_; @@ -3173,9 +3221,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestFieldOrderings() { } + public TestFieldOrderings() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestFieldOrderings(TestFieldOrderings other) { + public TestFieldOrderings(TestFieldOrderings other) : this() { myString_ = other.myString_; myInt_ = other.myInt_; myFloat_ = other.myFloat_; @@ -3373,9 +3425,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public NestedMessage() { } + public NestedMessage() { + OnConstruction(); + } - public NestedMessage(NestedMessage other) { + partial void OnConstruction(); + + public NestedMessage(NestedMessage other) : this() { oo_ = other.oo_; bb_ = other.bb_; } @@ -3516,9 +3572,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public SparseEnumMessage() { } + public SparseEnumMessage() { + OnConstruction(); + } + + partial void OnConstruction(); - public SparseEnumMessage(SparseEnumMessage other) { + public SparseEnumMessage(SparseEnumMessage other) : this() { sparseEnum_ = other.sparseEnum_; } @@ -3627,9 +3687,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public OneString() { } + public OneString() { + OnConstruction(); + } + + partial void OnConstruction(); - public OneString(OneString other) { + public OneString(OneString other) : this() { data_ = other.data_; } @@ -3738,9 +3802,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MoreString() { } + public MoreString() { + OnConstruction(); + } + + partial void OnConstruction(); - public MoreString(MoreString other) { + public MoreString(MoreString other) : this() { data_ = other.data_.Clone(); } @@ -3841,9 +3909,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public OneBytes() { } + public OneBytes() { + OnConstruction(); + } + + partial void OnConstruction(); - public OneBytes(OneBytes other) { + public OneBytes(OneBytes other) : this() { data_ = other.data_; } @@ -3952,9 +4024,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public MoreBytes() { } + public MoreBytes() { + OnConstruction(); + } + + partial void OnConstruction(); - public MoreBytes(MoreBytes other) { + public MoreBytes(MoreBytes other) : this() { data_ = other.data_; } @@ -4063,9 +4139,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public Int32Message() { } + public Int32Message() { + OnConstruction(); + } + + partial void OnConstruction(); - public Int32Message(Int32Message other) { + public Int32Message(Int32Message other) : this() { data_ = other.data_; } @@ -4174,9 +4254,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public Uint32Message() { } + public Uint32Message() { + OnConstruction(); + } + + partial void OnConstruction(); - public Uint32Message(Uint32Message other) { + public Uint32Message(Uint32Message other) : this() { data_ = other.data_; } @@ -4285,9 +4369,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public Int64Message() { } + public Int64Message() { + OnConstruction(); + } + + partial void OnConstruction(); - public Int64Message(Int64Message other) { + public Int64Message(Int64Message other) : this() { data_ = other.data_; } @@ -4396,9 +4484,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public Uint64Message() { } + public Uint64Message() { + OnConstruction(); + } + + partial void OnConstruction(); - public Uint64Message(Uint64Message other) { + public Uint64Message(Uint64Message other) : this() { data_ = other.data_; } @@ -4507,9 +4599,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public BoolMessage() { } + public BoolMessage() { + OnConstruction(); + } - public BoolMessage(BoolMessage other) { + partial void OnConstruction(); + + public BoolMessage(BoolMessage other) : this() { data_ = other.data_; } @@ -4618,9 +4714,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestOneof() { } + public TestOneof() { + OnConstruction(); + } - public TestOneof(TestOneof other) { + partial void OnConstruction(); + + public TestOneof(TestOneof other) : this() { switch (other.FooCase) { case FooOneofCase.FooInt: FooInt = other.FooInt; @@ -4819,9 +4919,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestPackedTypes() { } + public TestPackedTypes() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestPackedTypes(TestPackedTypes other) { + public TestPackedTypes(TestPackedTypes other) : this() { packedInt32_ = other.packedInt32_.Clone(); packedInt64_ = other.packedInt64_.Clone(); packedUint32_ = other.packedUint32_.Clone(); @@ -5182,9 +5286,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestUnpackedTypes() { } + public TestUnpackedTypes() { + OnConstruction(); + } - public TestUnpackedTypes(TestUnpackedTypes other) { + partial void OnConstruction(); + + public TestUnpackedTypes(TestUnpackedTypes other) : this() { unpackedInt32_ = other.unpackedInt32_.Clone(); unpackedInt64_ = other.unpackedInt64_.Clone(); unpackedUint32_ = other.unpackedUint32_.Clone(); @@ -5545,9 +5653,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestRepeatedScalarDifferentTagSizes() { } + public TestRepeatedScalarDifferentTagSizes() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestRepeatedScalarDifferentTagSizes(TestRepeatedScalarDifferentTagSizes other) { + public TestRepeatedScalarDifferentTagSizes(TestRepeatedScalarDifferentTagSizes other) : this() { repeatedFixed32_ = other.repeatedFixed32_.Clone(); repeatedInt32_ = other.repeatedInt32_.Clone(); repeatedFixed64_ = other.repeatedFixed64_.Clone(); @@ -5749,9 +5861,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public TestCommentInjectionMessage() { } + public TestCommentInjectionMessage() { + OnConstruction(); + } + + partial void OnConstruction(); - public TestCommentInjectionMessage(TestCommentInjectionMessage other) { + public TestCommentInjectionMessage(TestCommentInjectionMessage other) : this() { a_ = other.a_; } @@ -5860,9 +5976,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public FooRequest() { } + public FooRequest() { + OnConstruction(); + } + + partial void OnConstruction(); - public FooRequest(FooRequest other) { + public FooRequest(FooRequest other) : this() { } public FooRequest Clone() { @@ -5944,9 +6064,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public FooResponse() { } + public FooResponse() { + OnConstruction(); + } + + partial void OnConstruction(); - public FooResponse(FooResponse other) { + public FooResponse(FooResponse other) : this() { } public FooResponse Clone() { @@ -6028,9 +6152,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public FooClientMessage() { } + public FooClientMessage() { + OnConstruction(); + } + + partial void OnConstruction(); - public FooClientMessage(FooClientMessage other) { + public FooClientMessage(FooClientMessage other) : this() { } public FooClientMessage Clone() { @@ -6112,9 +6240,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public FooServerMessage() { } + public FooServerMessage() { + OnConstruction(); + } + + partial void OnConstruction(); - public FooServerMessage(FooServerMessage other) { + public FooServerMessage(FooServerMessage other) : this() { } public FooServerMessage Clone() { @@ -6196,9 +6328,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public BarRequest() { } + public BarRequest() { + OnConstruction(); + } + + partial void OnConstruction(); - public BarRequest(BarRequest other) { + public BarRequest(BarRequest other) : this() { } public BarRequest Clone() { @@ -6280,9 +6416,13 @@ namespace Google.Protobuf.TestProtos { private bool _frozen = false; public bool IsFrozen { get { return _frozen; } } - public BarResponse() { } + public BarResponse() { + OnConstruction(); + } + + partial void OnConstruction(); - public BarResponse(BarResponse other) { + public BarResponse(BarResponse other) : this() { } public BarResponse Clone() { |