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
304ff3a8
Commit
304ff3a8
authored
Aug 05, 2011
by
csharptest
Committed by
rogerk
Aug 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes from review e805fdfd3a6b
parent
9b3de692
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
FieldGeneratorBase.cs
src/ProtoGen/FieldGeneratorBase.cs
+4
-0
CodedOutputStream.cs
src/ProtocolBuffers/CodedOutputStream.cs
+1
-1
PopsicleList.cs
src/ProtocolBuffers/Collections/PopsicleList.cs
+4
-3
ProtocolBuffers.csproj
src/ProtocolBuffers/ProtocolBuffers.csproj
+1
-0
No files found.
src/ProtoGen/FieldGeneratorBase.cs
View file @
304ff3a8
...
@@ -72,6 +72,10 @@ namespace Google.ProtocolBuffers.ProtoGen
...
@@ -72,6 +72,10 @@ namespace Google.ProtocolBuffers.ProtoGen
return
true
;
return
true
;
}
}
/// <summary>
/// This returns true if the field has a non-default default value. For instance this returns
/// false for numerics with a default of zero '0', or booleans with a default of false.
/// </summary>
protected
bool
HasDefaultValue
protected
bool
HasDefaultValue
{
{
get
get
...
...
src/ProtocolBuffers/CodedOutputStream.cs
View file @
304ff3a8
...
@@ -370,7 +370,7 @@ namespace Google.ProtocolBuffers
...
@@ -370,7 +370,7 @@ namespace Google.ProtocolBuffers
WriteRawVarint32
(
value
);
WriteRawVarint32
(
value
);
}
}
public
void
WriteEnum
(
int
fieldNumber
,
string
fieldName
,
int
value
,
object
text
Value
)
public
void
WriteEnum
(
int
fieldNumber
,
string
fieldName
,
int
value
,
object
raw
Value
)
{
{
WriteTag
(
fieldNumber
,
WireFormat
.
WireType
.
Varint
);
WriteTag
(
fieldNumber
,
WireFormat
.
WireType
.
Varint
);
WriteRawVarint32
((
uint
)
value
);
WriteRawVarint32
((
uint
)
value
);
...
...
src/ProtocolBuffers/Collections/PopsicleList.cs
View file @
304ff3a8
...
@@ -42,7 +42,7 @@ namespace Google.ProtocolBuffers.Collections
...
@@ -42,7 +42,7 @@ namespace Google.ProtocolBuffers.Collections
/// </summary>
/// </summary>
public
sealed
class
PopsicleList
<
T
>
:
IPopsicleList
<
T
>,
ICastArray
public
sealed
class
PopsicleList
<
T
>
:
IPopsicleList
<
T
>,
ICastArray
{
{
private
static
readonly
IEnumerable
<
T
>
EmptySet
=
new
T
[
0
];
private
static
readonly
T
[]
EmptySet
=
new
T
[
0
];
private
List
<
T
>
items
;
private
List
<
T
>
items
;
private
bool
readOnly
;
private
bool
readOnly
;
...
@@ -134,7 +134,8 @@ namespace Google.ProtocolBuffers.Collections
...
@@ -134,7 +134,8 @@ namespace Google.ProtocolBuffers.Collections
public
IEnumerator
<
T
>
GetEnumerator
()
public
IEnumerator
<
T
>
GetEnumerator
()
{
{
return
items
==
null
?
EmptySet
.
GetEnumerator
()
:
items
.
GetEnumerator
();
IEnumerable
<
T
>
tenum
=
(
IEnumerable
<
T
>)
items
??
EmptySet
;
return
tenum
.
GetEnumerator
();
}
}
IEnumerator
IEnumerable
.
GetEnumerator
()
IEnumerator
IEnumerable
.
GetEnumerator
()
...
@@ -171,7 +172,7 @@ namespace Google.ProtocolBuffers.Collections
...
@@ -171,7 +172,7 @@ namespace Google.ProtocolBuffers.Collections
{
{
if
(
items
==
null
)
if
(
items
==
null
)
{
{
return
new
TItemType
[
0
]
;
return
PopsicleList
<
TItemType
>.
EmptySet
;
}
}
return
(
TItemType
[])
(
object
)
items
.
ToArray
();
return
(
TItemType
[])
(
object
)
items
.
ToArray
();
}
}
...
...
src/ProtocolBuffers/ProtocolBuffers.csproj
View file @
304ff3a8
...
@@ -88,6 +88,7 @@
...
@@ -88,6 +88,7 @@
<ItemGroup>
<ItemGroup>
<Reference
Include=
"mscorlib"
/>
<Reference
Include=
"mscorlib"
/>
<Reference
Include=
"System"
/>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
...
...
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