aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf
diff options
context:
space:
mode:
authorGravatar Sydney Acksman <ObsidianMinor@users.noreply.github.com>2018-04-19 13:57:31 -0500
committerGravatar Jie Luo <anandolee@gmail.com>2018-04-19 11:57:31 -0700
commit4ca46ede5cc838fb047bd4f86d2294db788567ad (patch)
treead811ccbaec9a67466c7caff9db18c153cabd161 /csharp/src/Google.Protobuf
parent0dc4d75da7bde8944bbefffae15931ea2eaf0759 (diff)
Write messages to backing field in generated C# cloning code (#4440)
* Edited MessageFieldGenerator to clone to backing field instead of property * Generated C# proto code
Diffstat (limited to 'csharp/src/Google.Protobuf')
-rw-r--r--csharp/src/Google.Protobuf/Reflection/Descriptor.cs20
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Api.cs2
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Type.cs6
3 files changed, 14 insertions, 14 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
index af68fa86..343dfecd 100644
--- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
+++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
@@ -350,8 +350,8 @@ namespace Google.Protobuf.Reflection {
enumType_ = other.enumType_.Clone();
service_ = other.service_.Clone();
extension_ = other.extension_.Clone();
- Options = other.options_ != null ? other.Options.Clone() : null;
- SourceCodeInfo = other.sourceCodeInfo_ != null ? other.SourceCodeInfo.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
+ sourceCodeInfo_ = other.sourceCodeInfo_ != null ? other.sourceCodeInfo_.Clone() : null;
syntax_ = other.syntax_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -775,7 +775,7 @@ namespace Google.Protobuf.Reflection {
enumType_ = other.enumType_.Clone();
extensionRange_ = other.extensionRange_.Clone();
oneofDecl_ = other.oneofDecl_.Clone();
- Options = other.options_ != null ? other.Options.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
reservedRange_ = other.reservedRange_.Clone();
reservedName_ = other.reservedName_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
@@ -1099,7 +1099,7 @@ namespace Google.Protobuf.Reflection {
public ExtensionRange(ExtensionRange other) : this() {
start_ = other.start_;
end_ = other.end_;
- Options = other.options_ != null ? other.Options.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -1597,7 +1597,7 @@ namespace Google.Protobuf.Reflection {
defaultValue_ = other.defaultValue_;
oneofIndex_ = other.oneofIndex_;
jsonName_ = other.jsonName_;
- Options = other.options_ != null ? other.Options.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -2078,7 +2078,7 @@ namespace Google.Protobuf.Reflection {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public OneofDescriptorProto(OneofDescriptorProto other) : this() {
name_ = other.name_;
- Options = other.options_ != null ? other.Options.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -2245,7 +2245,7 @@ namespace Google.Protobuf.Reflection {
public EnumDescriptorProto(EnumDescriptorProto other) : this() {
name_ = other.name_;
value_ = other.value_.Clone();
- Options = other.options_ != null ? other.Options.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
reservedRange_ = other.reservedRange_.Clone();
reservedName_ = other.reservedName_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
@@ -2658,7 +2658,7 @@ namespace Google.Protobuf.Reflection {
public EnumValueDescriptorProto(EnumValueDescriptorProto other) : this() {
name_ = other.name_;
number_ = other.number_;
- Options = other.options_ != null ? other.Options.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -2852,7 +2852,7 @@ namespace Google.Protobuf.Reflection {
public ServiceDescriptorProto(ServiceDescriptorProto other) : this() {
name_ = other.name_;
method_ = other.method_.Clone();
- Options = other.options_ != null ? other.Options.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -3039,7 +3039,7 @@ namespace Google.Protobuf.Reflection {
name_ = other.name_;
inputType_ = other.inputType_;
outputType_ = other.outputType_;
- Options = other.options_ != null ? other.Options.Clone() : null;
+ options_ = other.options_ != null ? other.options_.Clone() : null;
clientStreaming_ = other.clientStreaming_;
serverStreaming_ = other.serverStreaming_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
index 4db1f633..e4a4a365 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs
@@ -93,7 +93,7 @@ namespace Google.Protobuf.WellKnownTypes {
methods_ = other.methods_.Clone();
options_ = other.options_.Clone();
version_ = other.version_;
- SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null;
+ sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null;
mixins_ = other.mixins_.Clone();
syntax_ = other.syntax_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
index 84310550..3e2fe541 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs
@@ -123,7 +123,7 @@ namespace Google.Protobuf.WellKnownTypes {
fields_ = other.fields_.Clone();
oneofs_ = other.oneofs_.Clone();
options_ = other.options_.Clone();
- SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null;
+ sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null;
syntax_ = other.syntax_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -913,7 +913,7 @@ namespace Google.Protobuf.WellKnownTypes {
name_ = other.name_;
enumvalue_ = other.enumvalue_.Clone();
options_ = other.options_.Clone();
- SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null;
+ sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null;
syntax_ = other.syntax_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
@@ -1350,7 +1350,7 @@ namespace Google.Protobuf.WellKnownTypes {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Option(Option other) : this() {
name_ = other.name_;
- Value = other.value_ != null ? other.Value.Clone() : null;
+ value_ = other.value_ != null ? other.value_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}