コード例 #1
0
        private void shutdownAppDomain()
        {
            _proxy.Shutdown();
            AppDomain.Unload(_domain);


            _proxy  = null;
            _domain = null;
        }
コード例 #2
0
        private void startUpAppDomain(RemoteDomainExpression expression)
        {
            AppDomainSetup setup = expression.Setup;

            _domain = AppDomain.CreateDomain(expression.Setup.ApplicationName, null, setup);

            expression.As <IAssemblyMover>().MoveAssemblies(setup);

            Type proxyType = typeof(RemoteServicesProxy);

            _proxy = (RemoteServicesProxy)
                     _domain.CreateInstanceAndUnwrap(proxyType.Assembly.FullName, proxyType.FullName);

            _remoteListener = new RemoteListener(_messagingHub);

            _proxy.Start(expression.BootstrapperName, expression.Properties.ToDictionary().As <Dictionary <string, string> >(),
                         _remoteListener);
        }