Class MethodDescriptorProto (3.23.0)

public sealed class MethodDescriptorProto : IMessage<MethodDescriptorProto>, IEquatable<MethodDescriptorProto>, IDeepCloneable<MethodDescriptorProto>, IBufferMessage, IMessage

Describes a method of a service.

Inheritance

object > MethodDescriptorProto

Namespace

Google.Protobuf.Reflection

Assembly

Google.Protobuf.dll

Constructors

MethodDescriptorProto()

public MethodDescriptorProto()

MethodDescriptorProto(MethodDescriptorProto)

public MethodDescriptorProto(MethodDescriptorProto other)
Parameter
NameDescription
otherMethodDescriptorProto

Fields

ClientStreamingFieldNumber

public const int ClientStreamingFieldNumber = 5

Field number for the "client_streaming" field.

Field Value
TypeDescription
int

InputTypeFieldNumber

public const int InputTypeFieldNumber = 2

Field number for the "input_type" field.

Field Value
TypeDescription
int

NameFieldNumber

public const int NameFieldNumber = 1

Field number for the "name" field.

Field Value
TypeDescription
int

OptionsFieldNumber

public const int OptionsFieldNumber = 4

Field number for the "options" field.

Field Value
TypeDescription
int

OutputTypeFieldNumber

public const int OutputTypeFieldNumber = 3

Field number for the "output_type" field.

Field Value
TypeDescription
int

ServerStreamingFieldNumber

public const int ServerStreamingFieldNumber = 6

Field number for the "server_streaming" field.

Field Value
TypeDescription
int

Properties

ClientStreaming

public bool ClientStreaming { get; set; }

Identifies if client streams multiple client messages

Property Value
TypeDescription
bool

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
MessageDescriptor

HasClientStreaming

public bool HasClientStreaming { get; }

Gets whether the "client_streaming" field is set

Property Value
TypeDescription
bool

HasInputType

public bool HasInputType { get; }

Gets whether the "input_type" field is set

Property Value
TypeDescription
bool

HasName

public bool HasName { get; }

Gets whether the "name" field is set

Property Value
TypeDescription
bool

HasOutputType

public bool HasOutputType { get; }

Gets whether the "output_type" field is set

Property Value
TypeDescription
bool

HasServerStreaming

public bool HasServerStreaming { get; }

Gets whether the "server_streaming" field is set

Property Value
TypeDescription
bool

InputType

public string InputType { get; set; }

Input and output type names. These are resolved in the same way as FieldDescriptorProto.type_name, but must refer to a message type.

Property Value
TypeDescription
string

Name

public string Name { get; set; }
Property Value
TypeDescription
string

Options

public MethodOptions Options { get; set; }
Property Value
TypeDescription
MethodOptions

OutputType

public string OutputType { get; set; }
Property Value
TypeDescription
string

Parser

public static MessageParser<MethodDescriptorProto> Parser { get; }
Property Value
TypeDescription
MessageParserMethodDescriptorProto

ServerStreaming

public bool ServerStreaming { get; set; }

Identifies if server streams multiple server messages

Property Value
TypeDescription
bool

Methods

CalculateSize()

public int CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

Returns
TypeDescription
int

The number of bytes required to write this message to a coded output stream.

ClearClientStreaming()

public void ClearClientStreaming()

Clears the value of the "client_streaming" field

ClearInputType()

public void ClearInputType()

Clears the value of the "input_type" field

ClearName()

public void ClearName()

Clears the value of the "name" field

ClearOutputType()

public void ClearOutputType()

Clears the value of the "output_type" field

ClearServerStreaming()

public void ClearServerStreaming()

Clears the value of the "server_streaming" field

Clone()

public MethodDescriptorProto Clone()

Creates a deep clone of this object.

Returns
TypeDescription
MethodDescriptorProto

A deep clone of this object.

Equals(MethodDescriptorProto)

public bool Equals(MethodDescriptorProto other)
Parameter
NameDescription
otherMethodDescriptorProto
Returns
TypeDescription
bool

Equals(object)

public override bool Equals(object other)
Parameter
NameDescription
otherobject
Returns
TypeDescription
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
int
Overrides

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)

Merges the data from the specified coded input stream with the current message.

Parameter
NameDescription
inputCodedInputStream
Remarks

See the user guide for precise merge semantics.

MergeFrom(MethodDescriptorProto)

public void MergeFrom(MethodDescriptorProto other)

Merges the given message into this one.

Parameter
NameDescription
otherMethodDescriptorProto
Remarks

See the user guide for precise merge semantics.

ToString()

public override string ToString()
Returns
TypeDescription
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)

Writes the data to the given coded output stream.

Parameter
NameDescription
outputCodedOutputStream

Coded output stream to write the data to. Must not be null.

Extension Methods