Пример #1
0
        void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                if (_channel != null)
                {
                    _channel.Dispose();
                    _channel = null;
                }

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

                Logger.Shutdown();
            }

            _disposed = true;
        }
Пример #2
0
        void Create()
        {
            try
            {
                _controllerChannel = new OutboundChannel(_controllerAddress, _controllerPipeName);

                Type type = FindBootstrapperImplementationType(_bootstrapperType);

                _log.DebugFormat("[{0}] Creating bootstrapper: {1}", _serviceName, type.ToShortTypeName());

                object bootstrapper = FastActivator.Create(type);

                Type serviceType = bootstrapper.GetType()
                                   .GetInterfaces()
                                   .First()
                                   .GetGenericArguments()
                                   .First();

                _log.DebugFormat("[{0}] Creating configurator for service type: {1}", _serviceName, serviceType.ToShortTypeName());

                InitializeAndCreateService(serviceType, bootstrapper);
            }
            catch (Exception ex)
            {
                SendFault(ex);
            }
        }
Пример #3
0
        void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                if (_hostChannel != null)
                {
                    _hostChannel.Dispose();
                    _hostChannel = null;
                }

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

                _domain = null;
            }

            _disposed = true;
        }
Пример #4
0
 public void Unload()
 {
     if (_channel != null)
     {
         _channel.Dispose();
         _channel = null;
     }
 }
Пример #5
0
        void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                if (_hostChannel != null)
                {
                    _hostChannel.Dispose();
                    _hostChannel = null;
                }

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

                try
                {
                    _log.DebugFormat("[{0}] Unloading AppDomain", _serviceName);

                    _log.InfoFormat("[{0}] AppDomain Unloaded", _serviceName);
                }
                catch (Exception)
                {
                    _log.DebugFormat("[{0}] AppDomain was already unloaded", _serviceName);
                }
                finally
                {
                    _domain = null;
                }
            }

            _disposed = true;
        }
Пример #6
0
        public void CreateShelfChannel(Uri uri, string pipeName)
        {
            _log.DebugFormat("[{0}] Creating shelf proxy: {1} ({2})", _serviceName, uri, pipeName);

            _channel = new OutboundChannel(uri, pipeName);
        }