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
cb8644df
Commit
cb8644df
authored
Jun 17, 2009
by
Jon Skeet
Committed by
unknown
Jun 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a couple of warnings
parent
c784be31
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
MessageStreamIterator.cs
src/ProtocolBuffers/MessageStreamIterator.cs
+4
-1
UninitializedMessageException.cs
src/ProtocolBuffers/UninitializedMessageException.cs
+9
-3
No files found.
src/ProtocolBuffers/MessageStreamIterator.cs
View file @
cb8644df
...
...
@@ -65,7 +65,6 @@ namespace Google.ProtocolBuffers {
/// <summary>
/// Works out the builder type for TMessage, or throws an ArgumentException to explain why it can't.
/// This will check
/// </summary>
private
static
Type
FindBuilderType
()
{
MethodInfo
createBuilderMethod
=
typeof
(
TMessage
).
GetMethod
(
"CreateBuilder"
,
Type
.
EmptyTypes
);
...
...
@@ -87,6 +86,9 @@ namespace Google.ProtocolBuffers {
return
builderType
;
}
// This is only ever fetched by reflection, so the compiler may
// complain that it's unused
#pragma warning disable 0414
/// <summary>
/// Method we'll use to build messageReader, with the first parameter fixed to TMessage.CreateBuilder. Note that we
/// have to introduce another type parameter (TMessage2) as we can't constrain TMessage for just a single method
...
...
@@ -102,6 +104,7 @@ namespace Google.ProtocolBuffers {
input
.
ReadMessage
(
builder
,
registry
);
return
builder
.
Build
();
}
#pragma warning restore 0414
private
static
readonly
uint
ExpectedTag
=
WireFormat
.
MakeTag
(
1
,
WireFormat
.
WireType
.
LengthDelimited
);
...
...
src/ProtocolBuffers/UninitializedMessageException.cs
View file @
cb8644df
...
...
@@ -54,6 +54,15 @@ namespace Google.ProtocolBuffers {
}
/// <summary>
/// Returns a read-only list of human-readable names of
/// required fields missing from this message. Each name
/// is a full path to a field, e.g. "foo.bar[5].baz"
/// </summary>
public
IList
<
string
>
MissingFields
{
get
{
return
missingFields
;
}
}
/// <summary>
/// Converts this exception into an InvalidProtocolBufferException.
/// When a parsed message is missing required fields, this should be thrown
...
...
@@ -138,6 +147,3 @@ namespace Google.ProtocolBuffers {
}
}
}
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