Fix attribute mistake and regenerate code.

pull/625/head
Jon Skeet 9 years ago
parent 17fd398e1a
commit e2368c9022
  1. 4
      csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
  2. 2
      csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
  3. 2
      csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
  4. 2
      src/google/protobuf/compiler/csharp/csharp_message.cc

@ -786,12 +786,10 @@ namespace Google.Protobuf.TestProtos {
OneofBytes = 114,
}
private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
[pbr::ProtobufOneof("oneof_field")]
public OneofFieldOneofCase OneofFieldCase {
get { return oneofFieldCase_; }
}
[pbr::ProtobufOneof("oneof_field")]
public void ClearOneofField() {
pb::Freezable.CheckMutable(this);
oneofFieldCase_ = OneofFieldOneofCase.None;
@ -4728,12 +4726,10 @@ namespace Google.Protobuf.TestProtos {
FooMessage = 3,
}
private FooOneofCase fooCase_ = FooOneofCase.None;
[pbr::ProtobufOneof("foo")]
public FooOneofCase FooCase {
get { return fooCase_; }
}
[pbr::ProtobufOneof("foo")]
public void ClearFoo() {
pb::Freezable.CheckMutable(this);
fooCase_ = FooOneofCase.None;

@ -1592,12 +1592,10 @@ namespace Google.Protobuf.TestProtos {
BytesField = 18,
}
private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
[pbr::ProtobufOneof("oneof_field")]
public OneofFieldOneofCase OneofFieldCase {
get { return oneofFieldCase_; }
}
[pbr::ProtobufOneof("oneof_field")]
public void ClearOneofField() {
pb::Freezable.CheckMutable(this);
oneofFieldCase_ = OneofFieldOneofCase.None;

@ -295,12 +295,10 @@ namespace Google.Protobuf.WellKnownTypes {
ListValue = 6,
}
private KindOneofCase kindCase_ = KindOneofCase.None;
[pbr::ProtobufOneof("kind")]
public KindOneofCase KindCase {
get { return kindCase_; }
}
[pbr::ProtobufOneof("kind")]
public void ClearKind() {
pb::Freezable.CheckMutable(this);
kindCase_ = KindOneofCase.None;

@ -186,11 +186,9 @@ void MessageGenerator::Generate(io::Printer* printer) {
printer->Print(
vars,
"private $property_name$OneofCase $name$Case_ = $property_name$OneofCase.None;\n"
"[pbr::ProtobufOneof(\"$original_name$\")]\n"
"public $property_name$OneofCase $property_name$Case {\n"
" get { return $name$Case_; }\n"
"}\n\n"
"[pbr::ProtobufOneof(\"$original_name$\")]\n"
"public void Clear$property_name$() {\n"
" pb::Freezable.CheckMutable(this);\n"
" $name$Case_ = $property_name$OneofCase.None;\n"

Loading…
Cancel
Save