Ejemplo n.º 1
0
        public void Dispose()
        {
            if (this.disposing)
            {
                return;
            }
            this.disposing = true;

            if (listeningCts != null)
            {
                Utils.SafeExecute(() => listeningCts.Dispose());
                listeningCts = null;
            }

            Utils.SafeExecute(() => this.assemblyProcessor?.Dispose());

            Utils.SafeExecute(() => transport?.Dispose());
            if (ClientStatistics != null)
            {
                Utils.SafeExecute(() => ClientStatistics.Dispose());
                ClientStatistics = null;
            }

            Utils.SafeExecute(() => (this.ServiceProvider as IDisposable)?.Dispose());
            this.ServiceProvider = null;
            GC.SuppressFinalize(this);
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (listeningCts != null)
            {
                listeningCts.Dispose();
                listeningCts = null;
            }

            transport.Dispose();
            if (ClientStatistics != null)
            {
                ClientStatistics.Dispose();
                ClientStatistics = null;
            }
            GC.SuppressFinalize(this);
        }
Ejemplo n.º 3
0
        public void Dispose()
        {
            if (listeningCts != null)
            {
                listeningCts.Dispose();
                listeningCts = null;

                this.assemblyProcessor?.Dispose();
            }

            transport?.Dispose();
            if (ClientStatistics != null)
            {
                ClientStatistics.Dispose();
                ClientStatistics = null;
            }

            (this.ServiceProvider as IDisposable)?.Dispose();
            this.ServiceProvider = null;
            GC.SuppressFinalize(this);
        }