public sealed class Field : object, IMessage<Field>, IEquatable<Field>, IDeepCloneable<Field>, IBufferMessage, IMessage
A single field of a message type.
Namespace
Google.Protobuf.WellKnownTypes
Assembly
Google.Protobuf.dll
Constructors
Field()
Field(Field)
public Field(Field other)
Parameter
Name | Description |
other | Field
|
Fields
CardinalityFieldNumber
public const int CardinalityFieldNumber = null
Field number for the "cardinality" field.
Field Value
DefaultValueFieldNumber
public const int DefaultValueFieldNumber = null
Field number for the "default_value" field.
Field Value
JsonNameFieldNumber
public const int JsonNameFieldNumber = null
Field number for the "json_name" field.
Field Value
KindFieldNumber
public const int KindFieldNumber = null
Field number for the "kind" field.
Field Value
NameFieldNumber
public const int NameFieldNumber = null
Field number for the "name" field.
Field Value
NumberFieldNumber
public const int NumberFieldNumber = null
Field number for the "number" field.
Field Value
OneofIndexFieldNumber
public const int OneofIndexFieldNumber = null
Field number for the "oneof_index" field.
Field Value
OptionsFieldNumber
public const int OptionsFieldNumber = null
Field number for the "options" field.
Field Value
PackedFieldNumber
public const int PackedFieldNumber = null
Field number for the "packed" field.
Field Value
TypeUrlFieldNumber
public const int TypeUrlFieldNumber = null
Field number for the "type_url" field.
Field Value
Properties
Cardinality
public Field.Types.Cardinality Cardinality { get; set; }
Property Value
DefaultValue
public string DefaultValue { get; set; }
The string value of the default value of this field. Proto2 syntax only.
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
JsonName
public string JsonName { get; set; }
Property Value
Kind
public Field.Types.Kind Kind { get; set; }
Property Value
Name
public string Name { get; set; }
Property Value
Number
public int Number { get; set; }
Property Value
OneofIndex
public int OneofIndex { get; set; }
The index of the field type in Type.oneofs
, for message or enumeration
types. The first type has index 1; zero means the type is not in the list.
Property Value
Options
public RepeatedField<Option> Options { get; }
The protocol buffer options.
Property Value
Packed
public bool Packed { get; set; }
Whether to use alternative packed wire representation.
Property Value
Parser
public static MessageParser<Field> Parser { get; }
Property Value
TypeUrl
public string TypeUrl { get; set; }
The field type URL, without the scheme, for message or enumeration
types. Example: "type.googleapis.com/google.protobuf.Timestamp"
.
Property Value
Methods
CalculateSize()
public int CalculateSize()
Returns
Clone()
Returns
Equals(Field)
public bool Equals(Field other)
Parameter
Name | Description |
other | Field
|
Returns
Equals(Object)
public override bool Equals(object other)
Parameter
Returns
GetHashCode()
public override int GetHashCode()
Returns
public void MergeFrom(CodedInputStream input)
Parameter
MergeFrom(Field)
public void MergeFrom(Field other)
Parameter
Name | Description |
other | Field
|
ToString()
public override string ToString()
Returns
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)
Parameter
Explicit Interface Implementations
IBufferMessage.InternalMergeFrom(ref ParseContext)
void IBufferMessage.InternalMergeFrom(ref ParseContext input)
Parameter
IBufferMessage.InternalWriteTo(ref WriteContext)
void IBufferMessage.InternalWriteTo(ref WriteContext output)
Parameter
IMessage.Descriptor
MessageDescriptor IMessage.Descriptor { get; }
Returns