Example #1
0
        /// <summary>
        /// Frees managed resources.
        /// </summary>
        public void Dispose()
        {
            if (RemotingServer.DefaultRemotingServer == this)
            {
                RemotingServer.DefaultRemotingServer = null;
            }

            _serverInstances.TryRemove(_config.UniqueServerInstanceName, out _);

            if (Channel != null)
            {
                Channel.Dispose();
                Channel = null;
            }
        }
Example #2
0
        public void Dispose()
        {
            if (serverChannel != null)
            {
                serverChannel.Dispose();
                serverChannel = null;
            }

            if (callbackChannel != null)
            {
                callbackChannel.Dispose();
                callbackChannel = null;
            }

            if (assemblyLoader != null)
            {
                assemblyLoader.Dispose();
                assemblyLoader = null;
            }
        }