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
8e917d16
Commit
8e917d16
authored
Mar 23, 2019
by
Sydney Acksman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added FieldDescriptor.IsExtension and sealed ExtensionCollection
parent
8b7fb7d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
ExtensionCollection.cs
csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs
+1
-1
FieldDescriptor.cs
csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs
+5
-0
No files found.
csharp/src/Google.Protobuf/Reflection/ExtensionCollection.cs
View file @
8e917d16
...
...
@@ -39,7 +39,7 @@ namespace Google.Protobuf.Reflection
/// <summary>
/// A collection to simplify retrieving the descriptors of extensions in a descriptor for a message
/// </summary>
public
class
ExtensionCollection
public
sealed
class
ExtensionCollection
{
private
IDictionary
<
MessageDescriptor
,
IList
<
FieldDescriptor
>>
extensionsByTypeInDeclarationOrder
;
private
IDictionary
<
MessageDescriptor
,
IList
<
FieldDescriptor
>>
extensionsByTypeInNumberOrder
;
...
...
csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs
View file @
8e917d16
...
...
@@ -203,6 +203,11 @@ namespace Google.Protobuf.Reflection
/// </summary>
public
bool
IsPacked
=>
File
.
Proto
.
Syntax
==
"proto2"
?
Proto
.
Options
?.
Packed
??
false
:
!
Proto
.
Options
.
HasPacked
||
Proto
.
Options
.
Packed
;
/// <summary>
/// Returns <c>true</c> if this field extends another message type; <c>false</c> otherwise.
/// </summary>
public
bool
IsExtension
=>
Proto
.
HasExtendee
;
/// <summary>
/// Returns the type of the field.
/// </summary>
...
...
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