Ejemplo n.º 1
0
 /// <summary>
 /// Disposes of the managed web services (SoapHttpClientProtocols) used for communication with iNet.
 /// This should, in effect, cause the underlying connection to be closed.
 /// </summary>
 public void Dispose()
 {
     if (_webService != null)
     {
         _webService.Dispose();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Calls the Dispose method of the <see cref="SoapHttpClientProtocol"/> proxy object.
        /// </summary>
        /// <param name="onlineProxy">A reference to a proxy object created by the factory.</param>
        /// <exception cref="InvalidCastException">If onlineProxy can't be casted to SoapHttpClientProtocol</exception>
        public virtual void ReleaseOnlineProxy(object onlineProxy)
        {
            Guard.ArgumentNotNull(onlineProxy, "onlineProxy");
            SoapHttpClientProtocol proxy = onlineProxy as SoapHttpClientProtocol;

            if (proxy == null)
            {
                new InvalidCastException();
            }
            proxy.Dispose();
        }