Commit e2368c90 authored by Jon Skeet's avatar Jon Skeet

Fix attribute mistake and regenerate code.

parent 17fd398e
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment