/// <summary>
        /// Creates a <see cref="ServiceConsumer" /> from a factory method that returns a communication object / channel / Visual Studio Service Reference ServiceClient.
        /// </summary>
        /// <typeparam name="TServiceInterface">The type of the service interface.</typeparam>
        /// <param name="endpointConfigurationName">Name of the endpoint configuration.</param>
        /// <param name="retryPolicy">The retry policy.</param>
        /// <param name="exceptionStrategy">The exception strategy.</param>
        /// <param name="closeTriggerStrategy">The service channel close trigger strategy.</param>
        /// <returns>
        /// A <see cref="ServiceConsumer" />.
        /// </returns>
        public static IServiceConsumer <TServiceInterface> Create <TServiceInterface>(string endpointConfigurationName, IRetryPolicyFunction retryPolicy, IServiceConsumerExceptionBehaviourStrategy exceptionStrategy, IServiceChannelCloseTriggerStrategy closeTriggerStrategy)
        {
            Func <ICommunicationObject> factoryMethod = () => ServiceChannelFactory.CreateChannel <TServiceInterface>(endpointConfigurationName);

            return(ServiceConsumerFactory.Create <TServiceInterface>(factoryMethod, retryPolicy, exceptionStrategy, closeTriggerStrategy));
        }
        /// <summary>
        /// Creates a <see cref="ServiceConsumer" /> from a factory method that returns a communication object / channel / Visual Studio Service Reference ServiceClient.
        /// </summary>
        /// <typeparam name="TServiceInterface">The type of the service interface.</typeparam>
        /// <param name="endpointConfigurationName">Name of the endpoint configuration.</param>
        /// <param name="retryPolicy">The retry policy.</param>
        /// <returns>
        /// A <see cref="ServiceConsumer" />.
        /// </returns>
        public static IServiceConsumer <TServiceInterface> Create <TServiceInterface>(string endpointConfigurationName, IRetryPolicyFunction retryPolicy)
        {
            Func <ICommunicationObject> factoryMethod = () => ServiceChannelFactory.CreateChannel <TServiceInterface>(endpointConfigurationName);

            return(ServiceConsumerFactory.Create <TServiceInterface>(factoryMethod, retryPolicy));
        }