Example #1
0
        public void AugmentWithDefaults()
        {
            if (ReplicaOrdering == null)
                ReplicaOrdering = ClusterClientDefaults.ReplicaOrdering(Log);

            if (ResponseCriteria == null || ResponseCriteria.Count == 0)
                ResponseCriteria = ClusterClientDefaults.ResponseCriteria();

            if (RetryPolicy == null)
                RetryPolicy = ClusterClientDefaults.RetryPolicy;

            if (RetryStrategyEx == null)
            {
                RetryStrategyEx = RetryStrategy == null
                    ? ClusterClientDefaults.RetryStrategyEx
                    : new RetryStrategyAdapter(RetryStrategy);
            }

            if (ResponseSelector == null)
                ResponseSelector = ClusterClientDefaults.ResponseSelector;

            if (DefaultRequestStrategy == null)
                DefaultRequestStrategy = ClusterClientDefaults.RequestStrategy;

            if (ClientApplicationName == null)
                ClientApplicationName = ClusterClientDefaults.ClientApplicationName;
        }
        public void AugmentWithDefaults()
        {
            if (ReplicaOrdering == null)
            {
                ReplicaOrdering = ClusterClientDefaults.ReplicaOrdering(Log);
            }

            if (ResponseCriteria == null || ResponseCriteria.Count == 0)
            {
                ResponseCriteria = ClusterClientDefaults.ResponseCriteria();
            }

            if (RetryPolicy == null)
            {
                RetryPolicy = ClusterClientDefaults.RetryPolicy;
            }

            if (RetryStrategy == null)
            {
                RetryStrategy = ClusterClientDefaults.RetryStrategy;
            }

            if (ResponseSelector == null)
            {
                ResponseSelector = ClusterClientDefaults.ResponseSelector;
            }

            if (DefaultRequestStrategy == null)
            {
                DefaultRequestStrategy = ClusterClientDefaults.RequestStrategy;
            }

            if (ClientApplicationName == null)
            {
                ClientApplicationName = EnvironmentInfo.Application;
            }
        }