/// <summary>
        /// Initializes a new instance of the <see cref="ServiceConsumer{TServiceInterface}" /> class.
        /// </summary>
        /// <param name="retryEnabledDisposableServiceChannelProxy">The retry enabled disposable service channel proxy.</param>
        public ServiceConsumer(RetryEnabledDisposableServiceChannelProxy <TServiceInterface> retryEnabledDisposableServiceChannelProxy)
        {
            if (retryEnabledDisposableServiceChannelProxy == null)
            {
                throw new ArgumentNullException("retryEnabledDisposableServiceChannelProxy");
            }

            this.retryEnabledDisposableChannelProxy = retryEnabledDisposableServiceChannelProxy;
            this.operations = (TServiceInterface)retryEnabledDisposableServiceChannelProxy.GetTransparentProxy();
        }
 private void DisposeRetryEnabledDisposableChannelProxy()
 {
     try
     {
         if (this.retryEnabledDisposableChannelProxy != null)
         {
             this.retryEnabledDisposableChannelProxy.Dispose();
         }
     }
     finally
     {
         this.retryEnabledDisposableChannelProxy = null;
         this.operations = default(TServiceInterface);
     }
 }