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
9134a21f
Commit
9134a21f
authored
Aug 14, 2008
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks
parent
cabd06d1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
CSHARP-README.txt
CSHARP-README.txt
+2
-0
multiple_files_test.proto
...c/test/java/com/google/protobuf/multiple_files_test.proto
+6
-0
csharp_message.cc
src/google/protobuf/compiler/csharp/csharp_message.cc
+1
-4
No files found.
CSHARP-README.txt
View file @
9134a21f
...
...
@@ -38,3 +38,5 @@ o Nested types always end up under a "Types" static class which
is merely present to avoid name clashes.
o FileDescriptor.FindByName has been made generic to allow simple
type-safe searching for any nested type.
o No enum.valueOf for enums (due to them being simple C# enums)
o Public Builder constructors to aid C# object/collection initializers
java/src/test/java/com/google/protobuf/multiple_files_test.proto
View file @
9134a21f
...
...
@@ -26,6 +26,12 @@ package protobuf_unittest;
option
java_multiple_files
=
true
;
option
java_outer_classname
=
"MultipleFilesTestProto"
;
option
csharp_namespace
=
"Google.ProtocolBuffers.TestProtos"
;
option
csharp_file_classname
=
"MultiFileProto"
;
option
csharp_multiple_files
=
true
;
option
csharp_nest_classes
=
false
;
option
csharp_public_classes
=
true
;
message
MessageWithNoOuter
{
message
NestedMessage
{
optional
int32
i
=
1
;
...
...
src/google/protobuf/compiler/csharp/csharp_message.cc
View file @
9134a21f
...
...
@@ -215,9 +215,6 @@ void MessageGenerator::Generate(io::Printer* printer) {
}
printer
->
Indent
();
printer
->
Print
(
"// Use $classname$.CreateBuilder() to construct.
\r\n
"
"private $classname$() {}
\r\n
"
"
\r\n
"
"private static readonly $classname$ defaultInstance = new $classname$();
\r\n
"
"public static $classname$ DefaultInstance {
\r\n
"
" get { return defaultInstance; }
\r\n
"
...
...
@@ -383,7 +380,7 @@ GenerateParseFromMethods(io::Printer* printer) {
"public static $classname$ ParseFrom(byte[] data) {
\r\n
"
" return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
\r\n
"
"}
\r\n
"
"public static $classname$
p
arseFrom(byte[] data,
\r\n
"
"public static $classname$
P
arseFrom(byte[] data,
\r\n
"
" pb::ExtensionRegistry extensionRegistry) {
\r\n
"
" return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
\r\n
"
" .BuildParsed();
\r\n
"
...
...
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