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
e8c9ae12
Commit
e8c9ae12
authored
Oct 27, 2017
by
Jon Skeet
Committed by
Jon Skeet
Oct 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add parser settings WithXyz methods
parent
a9854512
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
JsonParser.cs
csharp/src/Google.Protobuf/JsonParser.cs
+17
-0
No files found.
csharp/src/Google.Protobuf/JsonParser.cs
View file @
e8c9ae12
...
...
@@ -1037,6 +1037,23 @@ namespace Google.Protobuf
/// <param name="ignoreUnknownFields"><c>true</c> if unknown fields should be ignored when parsing; <c>false</c> to throw an exception.</param>
public
Settings
WithIgnoreUnknownFields
(
bool
ignoreUnknownFields
)
=>
new
Settings
(
RecursionLimit
,
TypeRegistry
,
ignoreUnknownFields
);
/// <summary>
/// Creates a new <see cref="Settings"/> object based on this one, but with the specified recursion limit.
/// </summary>
/// <param name="recursionLimit">The new recursion limit.</param>
public
Settings
WithRecursionLimit
(
int
recursionLimit
)
=>
new
Settings
(
recursionLimit
,
TypeRegistry
,
IgnoreUnknownFields
);
/// <summary>
/// Creates a new <see cref="Settings"/> object based on this one, but with the specified type registry.
/// </summary>
/// <param name="typeRegistry">The new type registry. Must not be null.</param>
public
Settings
WithTypeRegistry
(
TypeRegistry
typeRegistry
)
=>
new
Settings
(
RecursionLimit
,
ProtoPreconditions
.
CheckNotNull
(
typeRegistry
,
nameof
(
typeRegistry
)),
IgnoreUnknownFields
);
}
}
}
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