Exemplo n.º 1
0
        public void InitializeDomain(TraceLevel traceLevel)
        {
            InternalTrace.Initialize("%a_%p.log", traceLevel);
            log = InternalTrace.GetLogger(typeof(DomainInitializer));

            log.Info("Initializing domain " + AppDomain.CurrentDomain.FriendlyName);
            AppDomain.CurrentDomain.DomainUnload += new EventHandler(OnDomainUnload);

            AssemblyResolver resolver = new AssemblyResolver();

            resolver.AddDirectory(NUnitConfiguration.NUnitLibDirectory);
            resolver.AddDirectory(NUnitConfiguration.AddinDirectory);
        }
Exemplo n.º 2
0
        public void InitializeDomain(int level)
        {
            InternalTraceLevel traceLevel = (InternalTraceLevel)level;

            InternalTrace.Initialize("%a_%p.log", traceLevel);
            log = InternalTrace.GetLogger(typeof(DomainInitializer));

            AppDomain domain = AppDomain.CurrentDomain;

            log.Info("Initializing domain {0}", domain.FriendlyName);
            log.Debug("  Base Directory: {0}", domain.BaseDirectory);
            log.Debug("  Probing Path: {0}", domain.SetupInformation.PrivateBinPath);

            domain.DomainUnload += new EventHandler(OnDomainUnload);

            AssemblyResolver resolver = new AssemblyResolver();

            resolver.AddDirectory(NUnitConfiguration.NUnitLibDirectory);
            resolver.AddDirectory(NUnitConfiguration.AddinDirectory);
        }
Exemplo n.º 3
0
        public void InitializeDomain(int level)
        {
            InternalTraceLevel traceLevel = (InternalTraceLevel)level;

            InternalTrace.Initialize("%a_%p.log", traceLevel);
            log = InternalTrace.GetLogger(typeof(DomainInitializer));

            AppDomain domain = AppDomain.CurrentDomain;

            log.Info("Initializing domain {0}", domain.FriendlyName);
            log.Debug("  Base Directory: {0}", domain.BaseDirectory);
            log.Debug("  Probing Path: {0}", domain.SetupInformation.PrivateBinPath);

            domain.DomainUnload += new EventHandler(OnDomainUnload);

            AssemblyResolver resolver = new AssemblyResolver();

            resolver.AddDirectory(NUnitConfiguration.NUnitLibDirectory);
            resolver.AddDirectory(NUnitConfiguration.AddinDirectory);

            // TODO: Temporary additions till we resolve a problem with pnunit
            // Test for existence is needed to avoid messing when the installation
            // does not include pnunit.
            string binDir = NUnitConfiguration.NUnitBinDirectory;
            string pnunitFrameworkPath = Path.Combine(binDir, "pnunit.framework.dll");

            if (File.Exists(pnunitFrameworkPath))
            {
                resolver.AddFile(pnunitFrameworkPath);
            }
            string pnunitAgentPath = Path.Combine(binDir, "pnunit-agent.exe");

            if (File.Exists(pnunitAgentPath))
            {
                resolver.AddFile(pnunitAgentPath);
            }
        }