Descriptor for a field or extension within a message in a .proto file.
More...
|
int | CompareTo (FieldDescriptor other) |
| Compares this descriptor with another one, ordering in "canonical" order which simply means ascending order by field number. other must be a field of the same type, i.e. the ContainingType of both fields must be the same. More...
|
|
Descriptor for a field or extension within a message in a .proto file.
◆ CompareTo()
int Google.Protobuf.Reflection.FieldDescriptor.CompareTo |
( |
FieldDescriptor |
other | ) |
|
|
inline |
Compares this descriptor with another one, ordering in "canonical" order which simply means ascending order by field number. other must be a field of the same type, i.e. the ContainingType of both fields must be the same.
◆ Accessor
IFieldAccessor Google.Protobuf.Reflection.FieldDescriptor.Accessor => accessor |
Returns the accessor for this field.
While a FieldDescriptor describes the field, it does not provide any way of obtaining or changing the value of the field within a specific message; that is the responsibility of the accessor.
The value returned by this property will be non-null for all regular fields. However, if a message containing a map field is introspected, the list of nested messages will include an auto-generated nested key/value pair message for the field. This is not represented in any generated type, and the value of the map field itself is represented by a dictionary in the reflection API. There are never instances of those "hidden" messages, so no accessor is provided and this property will return null.
◆ FieldNumber
int Google.Protobuf.Reflection.FieldDescriptor.FieldNumber => Proto.Number |
Returns the field number declared in the proto file.
◆ FieldType
FieldType Google.Protobuf.Reflection.FieldDescriptor.FieldType => fieldType |
Returns the type of the field.
◆ IsMap
bool Google.Protobuf.Reflection.FieldDescriptor.IsMap => fieldType == FieldType.Message && messageType.Proto.Options != null && messageType.Proto.Options.MapEntry |
Returns true
if this field is a map field; false
otherwise.
◆ IsPacked
bool Google.Protobuf.Reflection.FieldDescriptor.IsPacked |
Initial value:=>
Proto.Options == null || Proto.Options.Packed
Returns true
if this field is a packed, repeated field; false
otherwise.
◆ IsRepeated
bool Google.Protobuf.Reflection.FieldDescriptor.IsRepeated => Proto.Label == FieldDescriptorProto.Types.Label.Repeated |
Returns true
if this field is a repeated field; false
otherwise.
◆ Name
override string Google.Protobuf.Reflection.FieldDescriptor.Name => Proto.Name |
The brief name of the descriptor's target.
◆ ContainingOneof
Returns the oneof containing this field, or null
if it is not part of a oneof.
◆ ContainingType
Get the field's containing message type.
◆ EnumType
For enum fields, returns the field's type.
◆ JsonName
string Google.Protobuf.Reflection.FieldDescriptor.JsonName |
|
get |
The effective JSON name for this field. This is usually the lower-camel-cased form of the field name, but can be overridden using the json_name
option in the .proto file.
◆ MessageType
For embedded message and group fields, returns the field's type.
The documentation for this class was generated from the following file:
- Source/ThirdParty/libwebrtc/Source/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs