Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
55313c9c
Commit
55313c9c
authored
Oct 24, 2015
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generated code for previous commit (oneof case contributing to hash code and equality).
parent
964627ec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
0 deletions
+18
-0
Conformance.cs
csharp/src/Google.Protobuf.Conformance/Conformance.cs
+6
-0
UnittestIssues.cs
csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
+4
-0
UnittestProto3.cs
csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
+4
-0
UnittestWellKnownTypes.cs
...Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
+2
-0
DescriptorProtoFile.cs
csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
+0
-0
Struct.cs
csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
+2
-0
No files found.
csharp/src/Google.Protobuf.Conformance/Conformance.cs
View file @
55313c9c
...
...
@@ -269,6 +269,7 @@ namespace Conformance {
if
(
ProtobufPayload
!=
other
.
ProtobufPayload
)
return
false
;
if
(
JsonPayload
!=
other
.
JsonPayload
)
return
false
;
if
(
RequestedOutputFormat
!=
other
.
RequestedOutputFormat
)
return
false
;
if
(
PayloadCase
!=
other
.
PayloadCase
)
return
false
;
return
true
;
}
...
...
@@ -277,6 +278,7 @@ namespace Conformance {
if
(
payloadCase_
==
PayloadOneofCase
.
ProtobufPayload
)
hash
^=
ProtobufPayload
.
GetHashCode
();
if
(
payloadCase_
==
PayloadOneofCase
.
JsonPayload
)
hash
^=
JsonPayload
.
GetHashCode
();
if
(
RequestedOutputFormat
!=
global
::
Conformance
.
WireFormat
.
UNSPECIFIED
)
hash
^=
RequestedOutputFormat
.
GetHashCode
();
hash
^=
(
int
)
payloadCase_
;
return
hash
;
}
...
...
@@ -512,6 +514,7 @@ namespace Conformance {
if
(
ProtobufPayload
!=
other
.
ProtobufPayload
)
return
false
;
if
(
JsonPayload
!=
other
.
JsonPayload
)
return
false
;
if
(
Skipped
!=
other
.
Skipped
)
return
false
;
if
(
ResultCase
!=
other
.
ResultCase
)
return
false
;
return
true
;
}
...
...
@@ -522,6 +525,7 @@ namespace Conformance {
if
(
resultCase_
==
ResultOneofCase
.
ProtobufPayload
)
hash
^=
ProtobufPayload
.
GetHashCode
();
if
(
resultCase_
==
ResultOneofCase
.
JsonPayload
)
hash
^=
JsonPayload
.
GetHashCode
();
if
(
resultCase_
==
ResultOneofCase
.
Skipped
)
hash
^=
Skipped
.
GetHashCode
();
hash
^=
(
int
)
resultCase_
;
return
hash
;
}
...
...
@@ -1461,6 +1465,7 @@ namespace Conformance {
if
(!
object
.
Equals
(
OneofNestedMessage
,
other
.
OneofNestedMessage
))
return
false
;
if
(
OneofString
!=
other
.
OneofString
)
return
false
;
if
(
OneofBytes
!=
other
.
OneofBytes
)
return
false
;
if
(
OneofFieldCase
!=
other
.
OneofFieldCase
)
return
false
;
return
true
;
}
...
...
@@ -1532,6 +1537,7 @@ namespace Conformance {
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
OneofNestedMessage
)
hash
^=
OneofNestedMessage
.
GetHashCode
();
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
OneofString
)
hash
^=
OneofString
.
GetHashCode
();
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
OneofBytes
)
hash
^=
OneofBytes
.
GetHashCode
();
hash
^=
(
int
)
oneofFieldCase_
;
return
hash
;
}
...
...
csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs
View file @
55313c9c
...
...
@@ -1260,6 +1260,8 @@ namespace UnitTest.Issues.TestProtos {
if
(
PlainString
!=
other
.
PlainString
)
return
false
;
if
(
O2Int32
!=
other
.
O2Int32
)
return
false
;
if
(
O2String
!=
other
.
O2String
)
return
false
;
if
(
O1Case
!=
other
.
O1Case
)
return
false
;
if
(
O2Case
!=
other
.
O2Case
)
return
false
;
return
true
;
}
...
...
@@ -1271,6 +1273,8 @@ namespace UnitTest.Issues.TestProtos {
if
(
PlainString
.
Length
!=
0
)
hash
^=
PlainString
.
GetHashCode
();
if
(
o2Case_
==
O2OneofCase
.
O2Int32
)
hash
^=
O2Int32
.
GetHashCode
();
if
(
o2Case_
==
O2OneofCase
.
O2String
)
hash
^=
O2String
.
GetHashCode
();
hash
^=
(
int
)
o1Case_
;
hash
^=
(
int
)
o2Case_
;
return
hash
;
}
...
...
csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
View file @
55313c9c
...
...
@@ -868,6 +868,7 @@ namespace Google.Protobuf.TestProtos {
if
(!
object
.
Equals
(
OneofNestedMessage
,
other
.
OneofNestedMessage
))
return
false
;
if
(
OneofString
!=
other
.
OneofString
)
return
false
;
if
(
OneofBytes
!=
other
.
OneofBytes
)
return
false
;
if
(
OneofFieldCase
!=
other
.
OneofFieldCase
)
return
false
;
return
true
;
}
...
...
@@ -921,6 +922,7 @@ namespace Google.Protobuf.TestProtos {
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
OneofNestedMessage
)
hash
^=
OneofNestedMessage
.
GetHashCode
();
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
OneofString
)
hash
^=
OneofString
.
GetHashCode
();
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
OneofBytes
)
hash
^=
OneofBytes
.
GetHashCode
();
hash
^=
(
int
)
oneofFieldCase_
;
return
hash
;
}
...
...
@@ -4470,6 +4472,7 @@ namespace Google.Protobuf.TestProtos {
if
(
FooInt
!=
other
.
FooInt
)
return
false
;
if
(
FooString
!=
other
.
FooString
)
return
false
;
if
(!
object
.
Equals
(
FooMessage
,
other
.
FooMessage
))
return
false
;
if
(
FooCase
!=
other
.
FooCase
)
return
false
;
return
true
;
}
...
...
@@ -4478,6 +4481,7 @@ namespace Google.Protobuf.TestProtos {
if
(
fooCase_
==
FooOneofCase
.
FooInt
)
hash
^=
FooInt
.
GetHashCode
();
if
(
fooCase_
==
FooOneofCase
.
FooString
)
hash
^=
FooString
.
GetHashCode
();
if
(
fooCase_
==
FooOneofCase
.
FooMessage
)
hash
^=
FooMessage
.
GetHashCode
();
hash
^=
(
int
)
fooCase_
;
return
hash
;
}
...
...
csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
View file @
55313c9c
...
...
@@ -1596,6 +1596,7 @@ namespace Google.Protobuf.TestProtos {
if
(
BoolField
!=
other
.
BoolField
)
return
false
;
if
(
StringField
!=
other
.
StringField
)
return
false
;
if
(
BytesField
!=
other
.
BytesField
)
return
false
;
if
(
OneofFieldCase
!=
other
.
OneofFieldCase
)
return
false
;
return
true
;
}
...
...
@@ -1619,6 +1620,7 @@ namespace Google.Protobuf.TestProtos {
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
BoolField
)
hash
^=
BoolField
.
GetHashCode
();
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
StringField
)
hash
^=
StringField
.
GetHashCode
();
if
(
oneofFieldCase_
==
OneofFieldOneofCase
.
BytesField
)
hash
^=
BytesField
.
GetHashCode
();
hash
^=
(
int
)
oneofFieldCase_
;
return
hash
;
}
...
...
csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
View file @
55313c9c
This diff is collapsed.
Click to expand it.
csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
View file @
55313c9c
...
...
@@ -344,6 +344,7 @@ namespace Google.Protobuf.WellKnownTypes {
if
(
BoolValue
!=
other
.
BoolValue
)
return
false
;
if
(!
object
.
Equals
(
StructValue
,
other
.
StructValue
))
return
false
;
if
(!
object
.
Equals
(
ListValue
,
other
.
ListValue
))
return
false
;
if
(
KindCase
!=
other
.
KindCase
)
return
false
;
return
true
;
}
...
...
@@ -355,6 +356,7 @@ namespace Google.Protobuf.WellKnownTypes {
if
(
kindCase_
==
KindOneofCase
.
BoolValue
)
hash
^=
BoolValue
.
GetHashCode
();
if
(
kindCase_
==
KindOneofCase
.
StructValue
)
hash
^=
StructValue
.
GetHashCode
();
if
(
kindCase_
==
KindOneofCase
.
ListValue
)
hash
^=
ListValue
.
GetHashCode
();
hash
^=
(
int
)
kindCase_
;
return
hash
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment