The ServiceOptions, defined in descriptor.proto.
If the options message is not present (i.e. there are no options), null is returned.
Custom options can be retrieved as extensions of the returned message.
NOTE: A defensive copy is created each time this property is retrieved.
Returns a clone of the underlying ServiceDescriptorProto describing this service.
Note that a copy is taken every time this method is called, so clients using it frequently
(and not modifying it) may want to cache the returned value.
[[["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\u003eServiceDescriptor\u003c/code\u003e class describes a service type and is part of the \u003ccode\u003eGoogle.Protobuf.Reflection\u003c/code\u003e namespace within the Google.Protobuf.dll assembly.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eDescriptorBase\u003c/code\u003e and implements the \u003ccode\u003eIDescriptor\u003c/code\u003e interface, providing properties like \u003ccode\u003eFullName\u003c/code\u003e, \u003ccode\u003eFile\u003c/code\u003e, and \u003ccode\u003eName\u003c/code\u003e, along with methods like \u003ccode\u003eGetHashCode\u003c/code\u003e, among others.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to an unmodifiable list of methods within the service via the \u003ccode\u003eMethods\u003c/code\u003e property, returning an \u003ccode\u003eIList\u003c/code\u003e of \u003ccode\u003eMethodDescriptor\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers methods such as \u003ccode\u003eFindMethodByName\u003c/code\u003e for locating methods by their name, and \u003ccode\u003eGetOptions\u003c/code\u003e to retrieve the \u003ccode\u003eServiceOptions\u003c/code\u003e, which may include custom options.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eToProto\u003c/code\u003e method returns a clone of the \u003ccode\u003eServiceDescriptorProto\u003c/code\u003e, which is a protobuf representation of the service descriptor, allowing for a detailed view of its structure.\u003c/p\u003e\n"]]],[],null,["# Class ServiceDescriptor (3.27.1)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.1 (latest)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ServiceDescriptor)\n- [3.23.0](/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection.ServiceDescriptor)\n- [3.15.8](/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection.ServiceDescriptor) \n\n public sealed class ServiceDescriptor : DescriptorBase, IDescriptor\n\nDescribes a service type. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e [DescriptorBase](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase) \\\u003e ServiceDescriptor \n\nImplements\n----------\n\n[IDescriptor](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.IDescriptor) \n\nInherited Members\n-----------------\n\n[DescriptorBase.Index](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_Index) \n[DescriptorBase.FullName](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_FullName) \n[DescriptorBase.File](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_File) \n[DescriptorBase.Declaration](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_Declaration) \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \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[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\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\nProperties\n----------\n\n### CustomOptions\n\n [Obsolete(\"CustomOptions are obsolete. Use the GetOptions() method.\")]\n public CustomOptions CustomOptions { get; }\n\nThe (possibly empty) set of custom options for this service.\n\n### Methods\n\n public IList\u003cMethodDescriptor\u003e Methods { get; }\n\n### Name\n\n public override string Name { get; }\n\nThe brief name of the descriptor's target.\n\n**Overrides** \n[DescriptorBase.Name](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_Name)\n\nMethods\n-------\n\n### FindMethodByName(string)\n\n public MethodDescriptor FindMethodByName(string name)\n\nFinds a method by name.\n\n### GetOption\\\u003cT\\\u003e(Extension\\\u003cServiceOptions, T\\\u003e)\n\n [Obsolete(\"GetOption is obsolete. Use the GetOptions() method.\")]\n public T GetOption\u003cT\u003e(Extension\u003cServiceOptions, T\u003e extension)\n\nGets a single value service option for this descriptor\n\n### GetOption\\\u003cT\\\u003e(RepeatedExtension\\\u003cServiceOptions, T\\\u003e)\n\n [Obsolete(\"GetOption is obsolete. Use the GetOptions() method.\")]\n public RepeatedField\u003cT\u003e GetOption\u003cT\u003e(RepeatedExtension\u003cServiceOptions, T\u003e extension)\n\nGets a repeated value service option for this descriptor\n\n### GetOptions()\n\n public ServiceOptions GetOptions()\n\nThe `ServiceOptions`, defined in `descriptor.proto`.\nIf the options message is not present (i.e. there are no options), `null` is returned.\nCustom options can be retrieved as extensions of the returned message.\nNOTE: A defensive copy is created each time this property is retrieved.\n\n### ToProto()\n\n public ServiceDescriptorProto ToProto()\n\nReturns a clone of the underlying [ServiceDescriptorProto](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ServiceDescriptorProto) describing this service.\nNote that a copy is taken every time this method is called, so clients using it frequently\n(and not modifying it) may want to cache the returned value."]]