Class Method (3.23.0)

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

Method represents a method of an API interface.

Inheritance

object > Method

Namespace

Google.Protobuf.WellKnownTypes

Assembly

Google.Protobuf.dll

Constructors

Method()

public Method()

Method(Method)

public Method(Method other)
Parameter
NameDescription
otherMethod

Fields

NameFieldNumber

public const int NameFieldNumber = 1

Field number for the "name" field.

Field Value
TypeDescription
int

OptionsFieldNumber

public const int OptionsFieldNumber = 6

Field number for the "options" field.

Field Value
TypeDescription
int

RequestStreamingFieldNumber

public const int RequestStreamingFieldNumber = 3

Field number for the "request_streaming" field.

Field Value
TypeDescription
int

RequestTypeUrlFieldNumber

public const int RequestTypeUrlFieldNumber = 2

Field number for the "request_type_url" field.

Field Value
TypeDescription
int

ResponseStreamingFieldNumber

public const int ResponseStreamingFieldNumber = 5

Field number for the "response_streaming" field.

Field Value
TypeDescription
int

ResponseTypeUrlFieldNumber

public const int ResponseTypeUrlFieldNumber = 4

Field number for the "response_type_url" field.

Field Value
TypeDescription
int

SyntaxFieldNumber

public const int SyntaxFieldNumber = 7

Field number for the "syntax" field.

Field Value
TypeDescription
int

Properties

Descriptor

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

Name

public string Name { get; set; }

The simple name of this method.

Property Value
TypeDescription
string

Options

public RepeatedField<Option> Options { get; }

Any metadata attached to the method.

Property Value
TypeDescription
RepeatedFieldOption

Parser

public static MessageParser<Method> Parser { get; }
Property Value
TypeDescription
MessageParserMethod

RequestStreaming

public bool RequestStreaming { get; set; }

If true, the request is streamed.

Property Value
TypeDescription
bool

RequestTypeUrl

public string RequestTypeUrl { get; set; }

A URL of the input message type.

Property Value
TypeDescription
string

ResponseStreaming

public bool ResponseStreaming { get; set; }

If true, the response is streamed.

Property Value
TypeDescription
bool

ResponseTypeUrl

public string ResponseTypeUrl { get; set; }

The URL of the output message type.

Property Value
TypeDescription
string

Syntax

public Syntax Syntax { get; set; }

The source syntax of this method.

Property Value
TypeDescription
Syntax

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.

Clone()

public Method Clone()

Creates a deep clone of this object.

Returns
TypeDescription
Method

A deep clone of this object.

Equals(Method)

public bool Equals(Method other)
Parameter
NameDescription
otherMethod
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(Method)

public void MergeFrom(Method other)

Merges the given message into this one.

Parameter
NameDescription
otherMethod
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