Exemplo n.º 1
0
        /// <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();
        }
Exemplo n.º 2
0
 private void DisposeRetryEnabledDisposableChannelProxy()
 {
     try
     {
         if (this.retryEnabledDisposableChannelProxy != null)
         {
             this.retryEnabledDisposableChannelProxy.Dispose();
         }
     }
     finally
     {
         this.retryEnabledDisposableChannelProxy = null;
         this.operations = default(TServiceInterface);
     }
 }