Class ServiceDescriptor
Describes a service type.
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Protobuf.Reflection
Assembly: Google.Protobuf.dll
Syntax
public sealed class ServiceDescriptor : DescriptorBase, IDescriptor
Properties
CustomOptions
The (possibly empty) set of custom options for this service.
Declaration
[Obsolete("CustomOptions are obsolete. Use GetOption")]
public CustomOptions CustomOptions { get; }
Property Value
Type | Description |
---|---|
CustomOptions |
Methods
Declaration
public IList<MethodDescriptor> Methods { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<MethodDescriptor> | An unmodifiable list of methods in this service. |
Name
The brief name of the descriptor's target.
Declaration
public override string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
FindMethodByName(String)
Finds a method by name.
Declaration
public MethodDescriptor FindMethodByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The unqualified name of the method (e.g. "Foo"). |
Returns
Type | Description |
---|---|
MethodDescriptor | The method's decsriptor, or null if not found. |
GetOption<T>(Extension<ServiceOptions, T>)
Gets a single value service option for this descriptor
Declaration
public T GetOption<T>(Extension<ServiceOptions, T> extension)
Parameters
Type | Name | Description |
---|---|---|
Extension<ServiceOptions, T> | extension |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetOption<T>(RepeatedExtension<ServiceOptions, T>)
Gets a repeated value service option for this descriptor
Declaration
public RepeatedField<T> GetOption<T>(RepeatedExtension<ServiceOptions, T> extension)
Parameters
Type | Name | Description |
---|---|---|
RepeatedExtension<ServiceOptions, T> | extension |
Returns
Type | Description |
---|---|
RepeatedField<T> |
Type Parameters
Name | Description |
---|---|
T |