IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Engine.Services.DomainManager Class Reference

The DomainManager class handles the creation and unloading of domains as needed and keeps track of all existing domains. More...

+ Inheritance diagram for NUnit.Engine.Services.DomainManager:
+ Collaboration diagram for NUnit.Engine.Services.DomainManager:

Classes

class  DomainUnloader
 
class  TargetFrameworkAgent
 

Public Member Functions

AppDomain CreateDomain (TestPackage package)
 Construct an application domain for running a test package More...
 
void Unload (AppDomain domain)
 
void DeleteShadowCopyPath ()
 
override void StartService ()
 Initialize the Service More...
 
- Public Member Functions inherited from NUnit.Engine.Services.Service
virtual void StopService ()
 Do any cleanup needed before terminating the service More...
 
void Dispose ()
 

Static Public Member Functions

static string GetApplicationBase (TestPackage package)
 Figure out the ApplicationBase for a package More...
 
static string GetConfigFile (string appBase, TestPackage package)
 
static string GetCommonAppBase (IList< TestPackage > packages)
 
static string GetCommonAppBase (IList< string > assemblies)
 
static string GetPrivateBinPath (string basePath, string fileName)
 
static string GetPrivateBinPath (string appBase, TestPackage package)
 
static string GetPrivateBinPath (string basePath, IList< TestPackage > packages)
 
static string GetPrivateBinPath (string basePath, IList< string > assemblies)
 

Private Member Functions

AppDomainSetup CreateAppDomainSetup (TestPackage package)
 
string GetCachePath ()
 Get the location for caching and delete any old cache info More...
 
bool IsTestDomain (AppDomain domain)
 

Static Private Member Functions

static bool IsExecutable (string fileName)
 
static void DeleteCacheDir (DirectoryInfo cacheDir)
 Helper method to delete the cache dir. This method deals with a bug that occurs when files are marked read-only and deletes each file separately in order to give better exception information when problems occur. More...
 
static void SetTargetFramework (string assemblyPath, AppDomainSetup setup)
 

Private Attributes

ISettings _settingsService
 
string _shadowCopyPath = Path.Combine(NUnitConfiguration.NUnitBinDirectory, "ShadowCopyCache")
 

Static Private Attributes

static Logger log = InternalTrace.GetLogger(typeof(DomainManager))
 

Additional Inherited Members

- Protected Member Functions inherited from NUnit.Engine.Services.Service
virtual void Dispose (bool disposing)
 
- Protected Attributes inherited from NUnit.Engine.Services.Service
bool _disposed = false
 
- Properties inherited from NUnit.Engine.Services.Service
IServiceLocator ServiceContext [get, set]
 The ServiceContext More...
 
ServiceStatus Status [get, protected set]
 Gets the ServiceStatus of this service More...
 
- Properties inherited from NUnit.Engine.IService
IServiceLocator ServiceContext [get, set]
 The ServiceContext More...
 
ServiceStatus Status [get]
 Gets the ServiceStatus of this service More...
 

Detailed Description

The DomainManager class handles the creation and unloading of domains as needed and keeps track of all existing domains.

Member Function Documentation

AppDomainSetup NUnit.Engine.Services.DomainManager.CreateAppDomainSetup ( TestPackage  package)
inlineprivate
static string NUnit.Engine.Services.DomainManager.GetApplicationBase ( TestPackage  package)
inlinestatic
static bool NUnit.Engine.Services.DomainManager.IsExecutable ( string  fileName)
inlinestaticprivate
string NUnit.Engine.Services.DomainManager.GetCachePath ( )
inlineprivate

Get the location for caching and delete any old cache info

static void NUnit.Engine.Services.DomainManager.DeleteCacheDir ( DirectoryInfo  cacheDir)
inlinestaticprivate

Helper method to delete the cache dir. This method deals with a bug that occurs when files are marked read-only and deletes each file separately in order to give better exception information when problems occur.

TODO: This entire method is problematic. Should we be doing it?

Parameters
cacheDir

References NUnit.Common.Debug.

bool NUnit.Engine.Services.DomainManager.IsTestDomain ( AppDomain  domain)
inlineprivate
static string NUnit.Engine.Services.DomainManager.GetCommonAppBase ( IList< string >  assemblies)
inlinestatic
static string NUnit.Engine.Services.DomainManager.GetPrivateBinPath ( string  basePath,
string  fileName 
)
inlinestatic
static string NUnit.Engine.Services.DomainManager.GetPrivateBinPath ( string  appBase,
TestPackage  package 
)
inlinestatic
static string NUnit.Engine.Services.DomainManager.GetPrivateBinPath ( string  basePath,
IList< TestPackage packages 
)
inlinestatic
static string NUnit.Engine.Services.DomainManager.GetPrivateBinPath ( string  basePath,
IList< string >  assemblies 
)
inlinestatic
void NUnit.Engine.Services.DomainManager.DeleteShadowCopyPath ( )
inline
override void NUnit.Engine.Services.DomainManager.StartService ( )
inlinevirtual
static void NUnit.Engine.Services.DomainManager.SetTargetFramework ( string  assemblyPath,
AppDomainSetup  setup 
)
inlinestaticprivate

Member Data Documentation

Logger NUnit.Engine.Services.DomainManager.log = InternalTrace.GetLogger(typeof(DomainManager))
staticprivate
ISettings NUnit.Engine.Services.DomainManager._settingsService
private
string NUnit.Engine.Services.DomainManager._shadowCopyPath = Path.Combine(NUnitConfiguration.NUnitBinDirectory, "ShadowCopyCache")
private

The documentation for this class was generated from the following file: