public sealed class MethodDescriptorProto : IMessage<MethodDescriptorProto>, IEquatable<MethodDescriptorProto>, IDeepCloneable<MethodDescriptorProto>, IBufferMessage, IMessage
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eMethodDescriptorProto\u003c/code\u003e class describes a method within a service and is part of the \u003ccode\u003eGoogle.Protobuf.Reflection\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eIt implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, allowing for various operations like message comparison, deep cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides constructors to initialize an empty \u003ccode\u003eMethodDescriptorProto\u003c/code\u003e or create one based on an existing instance.\u003c/p\u003e\n"],["\u003cp\u003eKey properties include \u003ccode\u003eInputType\u003c/code\u003e, \u003ccode\u003eOutputType\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eClientStreaming\u003c/code\u003e, \u003ccode\u003eServerStreaming\u003c/code\u003e, and \u003ccode\u003eOptions\u003c/code\u003e, which define the method's input and output types, name, streaming behaviors, and additional options.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMethodDescriptorProto\u003c/code\u003e class has numerous methods available to allow size calculations, merging, clearing fields, cloning, and writing to streams.\u003c/p\u003e\n"]]],[],null,["# Class MethodDescriptorProto (3.27.1)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.1 (latest)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodDescriptorProto)\n- [3.23.0](/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection.MethodDescriptorProto)\n- [3.15.8](/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection.MethodDescriptorProto) \n\n public sealed class MethodDescriptorProto : IMessage\u003cMethodDescriptorProto\u003e, IEquatable\u003cMethodDescriptorProto\u003e, IDeepCloneable\u003cMethodDescriptorProto\u003e, IBufferMessage, IMessage\n\nDescribes a method of a service. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e MethodDescriptorProto \n\nImplements\n----------\n\n[IMessage](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1)[MethodDescriptorProto](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodDescriptorProto), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[MethodDescriptorProto](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodDescriptorProto), [IDeepCloneable](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1)[MethodDescriptorProto](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MethodDescriptorProto), [IBufferMessage](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage), [IMessage](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)\n\nNamespace\n---------\n\n[Google.Protobuf.Reflection](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection)\n\nAssembly\n--------\n\nGoogle.Protobuf.dll\n\nConstructors\n------------\n\n### MethodDescriptorProto()\n\n public MethodDescriptorProto()\n\n### MethodDescriptorProto(MethodDescriptorProto)\n\n public MethodDescriptorProto(MethodDescriptorProto other)\n\nFields\n------\n\n### ClientStreamingFieldNumber\n\n public const int ClientStreamingFieldNumber = 5\n\nField number for the \"client_streaming\" field.\n\n### InputTypeFieldNumber\n\n public const int InputTypeFieldNumber = 2\n\nField number for the \"input_type\" field.\n\n### NameFieldNumber\n\n public const int NameFieldNumber = 1\n\nField number for the \"name\" field.\n\n### OptionsFieldNumber\n\n public const int OptionsFieldNumber = 4\n\nField number for the \"options\" field.\n\n### OutputTypeFieldNumber\n\n public const int OutputTypeFieldNumber = 3\n\nField number for the \"output_type\" field.\n\n### ServerStreamingFieldNumber\n\n public const int ServerStreamingFieldNumber = 6\n\nField number for the \"server_streaming\" field.\n\nProperties\n----------\n\n### ClientStreaming\n\n public bool ClientStreaming { get; set; }\n\nIdentifies if client streams multiple client messages\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### HasClientStreaming\n\n public bool HasClientStreaming { get; }\n\nGets whether the \"client_streaming\" field is set\n\n### HasInputType\n\n public bool HasInputType { get; }\n\nGets whether the \"input_type\" field is set\n\n### HasName\n\n public bool HasName { get; }\n\nGets whether the \"name\" field is set\n\n### HasOutputType\n\n public bool HasOutputType { get; }\n\nGets whether the \"output_type\" field is set\n\n### HasServerStreaming\n\n public bool HasServerStreaming { get; }\n\nGets whether the \"server_streaming\" field is set\n\n### InputType\n\n public string InputType { get; set; }\n\nInput and output type names. These are resolved in the same way as\nFieldDescriptorProto.type_name, but must refer to a message type.\n\n### Name\n\n public string Name { get; set; }\n\n### Options\n\n public MethodOptions Options { get; set; }\n\n### OutputType\n\n public string OutputType { get; set; }\n\n### Parser\n\n public static MessageParser\u003cMethodDescriptorProto\u003e Parser { get; }\n\n### ServerStreaming\n\n public bool ServerStreaming { get; set; }\n\nIdentifies if server streams multiple server messages\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\nCalculates the size of this message in Protocol Buffer wire format, in bytes.\n\n### ClearClientStreaming()\n\n public void ClearClientStreaming()\n\nClears the value of the \"client_streaming\" field\n\n### ClearInputType()\n\n public void ClearInputType()\n\nClears the value of the \"input_type\" field\n\n### ClearName()\n\n public void ClearName()\n\nClears the value of the \"name\" field\n\n### ClearOutputType()\n\n public void ClearOutputType()\n\nClears the value of the \"output_type\" field\n\n### ClearServerStreaming()\n\n public void ClearServerStreaming()\n\nClears the value of the \"server_streaming\" field\n\n### Clone()\n\n public MethodDescriptorProto Clone()\n\nCreates a deep clone of this object.\n\n### Equals(MethodDescriptorProto)\n\n public bool Equals(MethodDescriptorProto other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\nMerges the data from the specified coded input stream with the current message.\n\n**Remarks** \nSee the user guide for precise merge semantics.\n\n### MergeFrom(MethodDescriptorProto)\n\n public void MergeFrom(MethodDescriptorProto other)\n\nMerges the given message into this one.\n\n**Remarks** \nSee the user guide for precise merge semantics.\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)\n\nWrites the data to the given coded output stream.\n\nExtension Methods\n-----------------\n\n[MessageExtensions.IsInitialized(IMessage)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_IsInitialized_Google_Protobuf_IMessage_) \n[MessageExtensions.MergeDelimitedFrom(IMessage, Stream)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeDelimitedFrom_Google_Protobuf_IMessage_System_IO_Stream_) \n[MessageExtensions.MergeFrom(IMessage, ByteString)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_Google_Protobuf_ByteString_) \n[MessageExtensions.MergeFrom(IMessage, ReadOnlySequence\\\u003cbyte\\\u003e)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Buffers_ReadOnlySequence_System_Byte__) \n[MessageExtensions.MergeFrom(IMessage, byte\\[\\])](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Byte___) \n[MessageExtensions.MergeFrom(IMessage, byte\\[\\], int, int)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Byte___System_Int32_System_Int32_) \n[MessageExtensions.MergeFrom(IMessage, Stream)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_IO_Stream_) \n[MessageExtensions.MergeFrom(IMessage, ReadOnlySpan\\\u003cbyte\\\u003e)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_ReadOnlySpan_System_Byte__) \n[MessageExtensions.ToByteArray(IMessage)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_ToByteArray_Google_Protobuf_IMessage_) \n[MessageExtensions.ToByteString(IMessage)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_ToByteString_Google_Protobuf_IMessage_) \n[MessageExtensions.WriteDelimitedTo(IMessage, Stream)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteDelimitedTo_Google_Protobuf_IMessage_System_IO_Stream_) \n[MessageExtensions.WriteTo(IMessage, IBufferWriter\\\u003cbyte\\\u003e)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_Buffers_IBufferWriter_System_Byte__) \n[MessageExtensions.WriteTo(IMessage, Stream)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_IO_Stream_) \n[MessageExtensions.WriteTo(IMessage, Span\\\u003cbyte\\\u003e)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_Span_System_Byte__)"]]