public static IClusterClient CreateClusterClient(string hostName, IEnumerable <IConfigurationSource> configurationSources)
        {
            var configBuilder = new ConfigurationBuilder();

            foreach (var source in configurationSources)
            {
                configBuilder.Add(source);
            }
            var configuration = configBuilder.Build();

            var builder = new ClientBuilder();

            builder.Properties["Configuration"] = configuration;
            builder.ConfigureCluster(ob => ob.Bind(configuration));
            ConfigureAppServices(configuration, builder);

            builder.ConfigureServices(services =>
            {
                TryConfigureTestClusterMembership(configuration, services);
                TryConfigureFileLogging(configuration, services, hostName);
            });

            builder.GetApplicationPartManager().ConfigureDefaults();
            return(builder.Build());
        }