public static IClusterClientEx Run(this IClientBuilder clientBuilder)
        {
            if (clientBuilder == null)
            {
                throw new ArgumentNullException(nameof(clientBuilder));
            }

            ClusterClientWapper clusterClientWapper = new ClusterClientWapper();

            clientBuilder
            .AddClientInvokeCallback(clusterClientWapper.Callback)
            .AddClusterConnectionLostHandler(clusterClientWapper.Handler);
            clusterClientWapper.ClusterClient = clientBuilder.Build();
            clusterClientWapper.ClusterClient.Connect().GetAwaiter().GetResult();
            return(clusterClientWapper);
        }
 public static IClientBuilder UseDiagnostics(this IClientBuilder builder)
 {
     return(builder
            .AddClientInvokeCallback(ClientDiagnosticsCallback.Intercept)
            .ConfigureServices(s => s.AddDiagnostics()));
 }