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
241e17ba
Commit
241e17ba
authored
Jun 29, 2015
by
Jon Skeet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #550 from jskeet/issue307
Fix for doubly-nested types - issue #307.
parents
b08b6bf6
8d83f8d1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
unittest_issues.proto
csharp/protos/extest/unittest_issues.proto
+9
-0
UnittestIssues.cs
csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs
+0
-0
csharp_helpers.cc
src/google/protobuf/compiler/csharp/csharp_helpers.cc
+1
-1
No files found.
csharp/protos/extest/unittest_issues.proto
View file @
241e17ba
...
@@ -9,6 +9,15 @@ option csharp_namespace = "UnitTest.Issues.TestProtos";
...
@@ -9,6 +9,15 @@ option csharp_namespace = "UnitTest.Issues.TestProtos";
package
unittest_issues
;
package
unittest_issues
;
option
optimize_for
=
SPEED
;
option
optimize_for
=
SPEED
;
// Issue 307: when generating doubly-nested types, any references
// should be of the form A.Types.B.Types.C.
message
Issue307
{
message
NestedOnce
{
message
NestedTwice
{
}
}
}
// Old issue 13: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=13
// Old issue 13: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=13
// New issue 309: https://github.com/google/protobuf/issues/309
// New issue 309: https://github.com/google/protobuf/issues/309
...
...
csharp/src/ProtocolBuffers.Test/TestProtos/UnittestIssues.cs
View file @
241e17ba
This diff is collapsed.
Click to expand it.
src/google/protobuf/compiler/csharp/csharp_helpers.cc
View file @
241e17ba
...
@@ -206,7 +206,7 @@ std::string ToCSharpName(const std::string& name, const FileDescriptor* file) {
...
@@ -206,7 +206,7 @@ std::string ToCSharpName(const std::string& name, const FileDescriptor* file) {
// the C# namespace.
// the C# namespace.
classname
=
name
.
substr
(
file
->
package
().
size
()
+
1
);
classname
=
name
.
substr
(
file
->
package
().
size
()
+
1
);
}
}
result
+=
StringReplace
(
classname
,
"."
,
".Types."
,
fals
e
);
result
+=
StringReplace
(
classname
,
"."
,
".Types."
,
tru
e
);
return
"global::"
+
result
;
return
"global::"
+
result
;
}
}
...
...
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