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
0cb84ee3
Commit
0cb84ee3
authored
Aug 14, 2015
by
Jon Skeet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #720 from jtattermusch/csharp_fixes
C# fix for TypeInitializer exception.
parents
5c370cc5
fa2fe35d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
JsonFormatterTest.cs
csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs
+0
-1
DescriptorsTest.cs
...rp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs
+7
-0
DescriptorProtoFile.cs
csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
+0
-0
csharp_field_base.cc
src/google/protobuf/compiler/csharp/csharp_field_base.cc
+1
-1
No files found.
csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs
View file @
0cb84ee3
...
@@ -244,7 +244,6 @@ namespace Google.Protobuf
...
@@ -244,7 +244,6 @@ namespace Google.Protobuf
[
TestCase
(
null
,
"{ }"
)]
[
TestCase
(
null
,
"{ }"
)]
[
TestCase
(
"x"
,
"{ 'fooString': 'x' }"
)]
[
TestCase
(
"x"
,
"{ 'fooString': 'x' }"
)]
[
TestCase
(
""
,
"{ 'fooString': '' }"
)]
[
TestCase
(
""
,
"{ 'fooString': '' }"
)]
[
TestCase
(
null
,
"{ }"
)]
public
void
Oneof
(
string
fooStringValue
,
string
expectedJson
)
public
void
Oneof
(
string
fooStringValue
,
string
expectedJson
)
{
{
var
message
=
new
TestOneof
();
var
message
=
new
TestOneof
();
...
...
csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs
View file @
0cb84ee3
...
@@ -251,5 +251,12 @@ namespace Google.Protobuf.Reflection
...
@@ -251,5 +251,12 @@ namespace Google.Protobuf.Reflection
Assert
.
AreEqual
(
new
[]
{
11
,
1
,
101
,
200
},
fields
.
InDeclarationOrder
().
Select
(
x
=>
x
.
FieldNumber
));
Assert
.
AreEqual
(
new
[]
{
11
,
1
,
101
,
200
},
fields
.
InDeclarationOrder
().
Select
(
x
=>
x
.
FieldNumber
));
Assert
.
AreEqual
(
new
[]
{
1
,
11
,
101
,
200
},
fields
.
InFieldNumberOrder
().
Select
(
x
=>
x
.
FieldNumber
));
Assert
.
AreEqual
(
new
[]
{
1
,
11
,
101
,
200
},
fields
.
InFieldNumberOrder
().
Select
(
x
=>
x
.
FieldNumber
));
}
}
[
Test
]
public
void
DescriptorProtoFileDescriptor
()
{
var
descriptor
=
Google
.
Protobuf
.
Reflection
.
FileDescriptor
.
DescriptorProtoFileDescriptor
;
}
}
}
}
}
csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
View file @
0cb84ee3
This diff is collapsed.
Click to expand it.
src/google/protobuf/compiler/csharp/csharp_field_base.cc
View file @
0cb84ee3
...
@@ -67,7 +67,7 @@ void FieldGeneratorBase::SetCommonFieldVariables(
...
@@ -67,7 +67,7 @@ void FieldGeneratorBase::SetCommonFieldVariables(
tag_bytes
+=
", "
+
SimpleItoa
(
tag_array
[
i
]);
tag_bytes
+=
", "
+
SimpleItoa
(
tag_array
[
i
]);
}
}
(
*
variables
)[
"access_level"
]
=
class_access_level
()
;
(
*
variables
)[
"access_level"
]
=
"public"
;
(
*
variables
)[
"tag"
]
=
SimpleItoa
(
tag
);
(
*
variables
)[
"tag"
]
=
SimpleItoa
(
tag
);
(
*
variables
)[
"tag_size"
]
=
SimpleItoa
(
tag_size
);
(
*
variables
)[
"tag_size"
]
=
SimpleItoa
(
tag_size
);
(
*
variables
)[
"tag_bytes"
]
=
tag_bytes
;
(
*
variables
)[
"tag_bytes"
]
=
tag_bytes
;
...
...
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