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
984eb9c2
Commit
984eb9c2
authored
Aug 15, 2008
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just comments.
parent
3fa72c55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
AbstractBuilder.cs
csharp/ProtocolBuffers/AbstractBuilder.cs
+1
-1
csharp_primitive_field.cc
...google/protobuf/compiler/csharp/csharp_primitive_field.cc
+3
-3
No files found.
csharp/ProtocolBuffers/AbstractBuilder.cs
View file @
984eb9c2
...
@@ -121,7 +121,7 @@ namespace Google.ProtocolBuffers {
...
@@ -121,7 +121,7 @@ namespace Google.ProtocolBuffers {
// them to insure that they don't change after verification (since
// them to insure that they don't change after verification (since
// the Message interface itself cannot enforce immutability of
// the Message interface itself cannot enforce immutability of
// implementations).
// implementations).
// TODO(jonskeet): Provide a function somewhere called
m
akeDeepCopy()
// TODO(jonskeet): Provide a function somewhere called
M
akeDeepCopy()
// which allows people to make secure deep copies of messages.
// which allows people to make secure deep copies of messages.
foreach
(
KeyValuePair
<
FieldDescriptor
,
object
>
entry
in
other
.
AllFields
)
{
foreach
(
KeyValuePair
<
FieldDescriptor
,
object
>
entry
in
other
.
AllFields
)
{
FieldDescriptor
field
=
entry
.
Key
;
FieldDescriptor
field
=
entry
.
Key
;
...
...
src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
View file @
984eb9c2
...
@@ -243,10 +243,10 @@ GenerateMembers(io::Printer* printer) const {
...
@@ -243,10 +243,10 @@ GenerateMembers(io::Printer* printer) const {
"public scg::IList<$type$> $capitalized_name$List {
\r\n
"
"public scg::IList<$type$> $capitalized_name$List {
\r\n
"
" get { return $name$_; }
\r\n
"
// note: unmodifiable list
" get { return $name$_; }
\r\n
"
// note: unmodifiable list
"}
\r\n
"
"}
\r\n
"
"public int $capitalized_name$Count {
\r\n
"
// TODO(jonskeet): Remove?
"public int $capitalized_name$Count {
\r\n
"
" get { return $name$_.Count; }
\r\n
"
" get { return $name$_.Count; }
\r\n
"
"}
\r\n
"
"}
\r\n
"
"public $type$ Get$capitalized_name$(int index) {
\r\n
"
// TODO(jonskeet): Remove?
"public $type$ Get$capitalized_name$(int index) {
\r\n
"
" return $name$_[index];
\r\n
"
" return $name$_[index];
\r\n
"
"}
\r\n
"
);
"}
\r\n
"
);
}
}
...
@@ -257,7 +257,7 @@ GenerateBuilderMembers(io::Printer* printer) const {
...
@@ -257,7 +257,7 @@ GenerateBuilderMembers(io::Printer* printer) const {
// Note: We return an unmodifiable list because otherwise the caller
// Note: We return an unmodifiable list because otherwise the caller
// could hold on to the returned list and modify it after the message
// could hold on to the returned list and modify it after the message
// has been built, thus mutating the message which is supposed to be
// has been built, thus mutating the message which is supposed to be
// immutable.
// immutable.
This unfortunately limits the use for collection initializers...
"public scg::IList<$type$> $capitalized_name$List {
\r\n
"
"public scg::IList<$type$> $capitalized_name$List {
\r\n
"
" get { return pbc::Lists<$type$>.AsReadOnly(result.$name$_); }
\r\n
"
" get { return pbc::Lists<$type$>.AsReadOnly(result.$name$_); }
\r\n
"
"}
\r\n
"
"}
\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