// Load CarLibrary.dll into the new AppDomain.
AppDomain anotherAD = AppDomain.CreateDomain("SecondAppDomain");
try
{
anotherAD.Load("CarLibrary");
PrintAllAssembliesInAppDomain(anotherAD);
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
Console.ReadLine();
}
To solidify the relationship between processes, application domains, and assemblies,
Figure 17-8 diagrams the internal composition of the AppDomainManipulator.exe process just
constructed.
C H A P T E R 1 7
■
P R O C E S S E S, A P P D O M A I N S, A N D O B J E C T C O N T E X T S
575
8849CH17.qxd 10/9/07 4:29 PM Page 575
Figure 17-8.
The AppDomainManipulator.exe process under the hood
Do'stlaringiz bilan baham: |