Beispiel #1
0
        /// <summary>
        /// This must be called explicitly by clients to ensure the remote server is released.
        /// </summary>
        public virtual void Dispose()
        {
            if (_factory != null)
            {
                _factory.Dispose();
                _factory = null;
            }

            if (_server != null)
            {
                try { Disconnect(); }
                catch (Exception e)
                {
                }

                _server = null;
            }
        }
Beispiel #2
0
        /// <summary>
        /// This must be called explicitly by clients to ensure the remote server is released.
        /// </summary>
        public virtual void Dispose()
        {
            if (Factory != null)
            {
                Factory.Dispose();
                Factory = null;
            }

            if (Server != null)
            {
                try { Disconnect(); }
                catch
                {
                    // ignored
                }

                Server = null;
            }
        }