Skip to content

Commit

Permalink
Remove obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamranjan committed Oct 19, 2023
1 parent 8dcc40e commit fcdbf40
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions dotnet-etcd/etcdClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,42 +149,6 @@ public EtcdClient(string connectionString, int port = 2379, string serverName =
};
}

[Obsolete("Use constructor accepting Action<GrpcChannelOptions> configureChannelOptions instead.")]
public EtcdClient(string connectionString, int port = 2379, string serverName = DefaultServerName,
HttpClientHandler handler = null, bool ssl = false,
bool useLegacyRpcExceptionForCancellation = false, Interceptor[] interceptors = null,
MethodConfig grpcMethodConfig = null, RetryThrottlingPolicy grpcRetryThrottlingPolicy = null) : this(connectionString, port, serverName, (options) =>
{
grpcMethodConfig ??= _defaultGrpcMethodConfig;
grpcRetryThrottlingPolicy ??= _defaultRetryThrottlingPolicy;
interceptors ??= Array.Empty<Interceptor>();
options.HttpHandler = handler;
options.ThrowOperationCanceledOnCancellation = !useLegacyRpcExceptionForCancellation;
options.ServiceConfig = new ServiceConfig
{
MethodConfigs = { grpcMethodConfig },
RetryThrottling = grpcRetryThrottlingPolicy,
LoadBalancingConfigs = { new RoundRobinConfig() },
};
if (ssl)
{
options.Credentials = new SslCredentials();
}
else
{
#if NETCOREAPP3_1 || NETCOREAPP3_0
AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
#endif
options.Credentials = ChannelCredentials.Insecure;
}
}, interceptors)
{

}

#endregion

#region IDisposable Support
Expand Down

0 comments on commit fcdbf40

Please sign in to comment.