<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />

Grpc.Net.Client.Configuration.ServiceConfig

public sealed class ServiceConfig : ConfigObject
A ServiceConfig represents information about a service.

Gets a collection of LoadBalancingConfig instances. The client will iterate through the configured policies in order and use the first policy that is supported. If none are supported by the client then a configuration error is thrown.

public IList<MethodConfig> MethodConfigs { get; }

Gets a collection of MethodConfig instances. This collection is used to specify configuration on a per-method basis. Names determines which calls a method config applies to.

Gets or sets the retry throttling policy. If a RetryThrottlingPolicy is provided, gRPC will automatically throttle retry attempts and hedged RPCs when the client's ratio of failures to successes exceeds a threshold.

For more information about configuring throttling, see .

public ServiceConfig()

Initializes a new instance of the ServiceConfig class.