public ContextSwitchTests() { otherDomain = AppDomain.CreateDomain("other domain", null, AppDomain.CurrentDomain.BaseDirectory, null, false); contextSwitcher = (ContextSwitcher)otherDomain.CreateInstanceAndUnwrap( Assembly.GetExecutingAssembly().GetName().Name, typeof(ContextSwitcher).FullName); }
public ContextSwitchTests() { FileInfo assemblyFile = new FileInfo( Assembly.GetExecutingAssembly().Location); otherDomain = AppDomain.CreateDomain("other domain", null, AppDomain.CurrentDomain.BaseDirectory, null, false); contextSwitcher = (ContextSwitcher)otherDomain.CreateInstanceAndUnwrap( Assembly.GetExecutingAssembly().GetName().Name, typeof(ContextSwitcher).FullName); }
public void FixtureSetUp() { FileInfo assemblyFile = new FileInfo( Assembly.GetExecutingAssembly().Location); otherDomain = AppDomain.CreateDomain("other domain", null, AppDomain.CurrentDomain.BaseDirectory, null, false); contextSwitcher = (ContextSwitcher)otherDomain.CreateInstanceAndUnwrap( Assembly.GetExecutingAssembly().GetName().Name, typeof(ContextSwitcher).FullName); }
public ContextSwitchTests() { var assemblyName = Assembly.GetExecutingAssembly().FullName; var typeName = typeof(ContextSwitcher).FullName; var info = new AppDomainSetup(); info.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory; info.ApplicationName = Guid.NewGuid().ToString(); otherDomain = AppDomain.CreateDomain(info.ApplicationName, null, info, new PermissionSet(PermissionState.Unrestricted), new StrongName[0]); contextSwitcher = (ContextSwitcher)otherDomain.CreateInstanceAndUnwrap(assemblyName, typeName, false, BindingFlags.Default, null, new object[0], null, null, null); }